fc_pro_override_template_with_theme_file
Type: Filter
Filters whether a theme template file replaces the Fluid Checkout PRO template.
Signature
apply_filters( 'fc_pro_override_template_with_theme_file', $override, $template, $template_name, $template_path );
Parameters
| Name | Type | Description |
|---|---|---|
$override | bool | Whether a theme template file replaces the Fluid Checkout PRO template. Default false. |
$template | string | Absolute path of the located template. |
$template_name | string | Template path relative to the templates directory. |
$template_path | string | Template directory path. |
Since
1.2.0
Source: inc/account-matching.php
Examples
add_filter( 'fc_pro_override_template_with_theme_file',
/**
* Override Fluid Checkout PRO template files with theme versions.
*
* @param bool $override Whether a theme template file replaces the Fluid Checkout PRO template. Default false.
* @param string $template Absolute path of the located template.
* @param string $template_name Template path relative to the templates directory.
* @param string $template_path Template directory path.
* @return bool Filtered value.
*/
function( $override, $template, $template_name, $template_path ) {
// Change this list with the template files you want to override
$override_templates_list = array(
'cart/cart.php',
);
if ( in_array( $template_name, $override_templates_list ) ) {
$override = true;
}
return $override;
},
10,
4
);