Adding `$default_path` parameter to `woocommerce_locate_template` filter (#52169)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
This commit is contained in:
parent
20d210421d
commit
21c5a3d806
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Add parameter to woocommerce_locate_template filter
|
|
@ -416,8 +416,19 @@ function wc_locate_template( $template_name, $template_path = '', $default_path
|
|||
}
|
||||
}
|
||||
|
||||
// Return what we found.
|
||||
return apply_filters( 'woocommerce_locate_template', $template, $template_name, $template_path );
|
||||
/**
|
||||
* Filter to customize the path of a given WooCommerce template.
|
||||
*
|
||||
* Note: the $default_path argument was added in WooCommerce 9.5.0.
|
||||
*
|
||||
* @param string $template Full file path of the template.
|
||||
* @param string $template_name Template name.
|
||||
* @param string $template_path Template path.
|
||||
* @param string $template_path Default WooCommerce templates path.
|
||||
*
|
||||
* @since 9.5.0 $default_path argument added.
|
||||
*/
|
||||
return apply_filters( 'woocommerce_locate_template', $template, $template_name, $template_path, $default_path );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue