woocommerce_disable_compatibility_layer filter-hookWC 7.6.0

Filter to disable the compatibility layer for the blockified templates.

This hook allows to disable the compatibility layer for the blockified templates.

Usage

add_filter( 'woocommerce_disable_compatibility_layer', 'wp_kama_woocommerce_disable_compatibility_layer_filter' );

/**
 * Function for `woocommerce_disable_compatibility_layer` filter-hook.
 * 
 * @param boolean. $false 
 *
 * @return boolean.
 */
function wp_kama_woocommerce_disable_compatibility_layer_filter( $false ){

	// filter...
	return $false;
}
$false(boolean.)
-

Changelog

Since 7.6.0 Introduced.

Where the hook is called

AbstractTemplateCompatibility::init()
woocommerce_disable_compatibility_layer
woocommerce/src/Blocks/Templates/AbstractTemplateCompatibility.php 41
$is_disabled_compatility_layer = apply_filters( 'woocommerce_disable_compatibility_layer', false );
woocommerce/src/Blocks/Templates/AbstractTemplateCompatibility.php 64
$is_disabled_compatility_layer = apply_filters( 'woocommerce_disable_compatibility_layer', false );

Where the hook is used in WooCommerce

woocommerce/src/Blocks/Templates/ProductAttributeTemplate.php 67
add_filter( 'woocommerce_disable_compatibility_layer', '__return_true' );
woocommerce/src/Blocks/Templates/ProductCatalogTemplate.php 55
add_filter( 'woocommerce_disable_compatibility_layer', '__return_true' );
woocommerce/src/Blocks/Templates/ProductCategoryTemplate.php 61
add_filter( 'woocommerce_disable_compatibility_layer', '__return_true' );
woocommerce/src/Blocks/Templates/ProductSearchResultsTemplate.php 61
add_filter( 'woocommerce_disable_compatibility_layer', '__return_true' );
woocommerce/src/Blocks/Templates/ProductTagTemplate.php 61
add_filter( 'woocommerce_disable_compatibility_layer', '__return_true' );
woocommerce/src/Blocks/Templates/SingleProductTemplate.php 61
add_filter( 'woocommerce_disable_compatibility_layer', '__return_true' );