woocommerce_disable_compatibility_layer хук-фильтрWC 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.

Использование

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.)
-

Список изменений

С версии 7.6.0 Введена.

Где вызывается хук

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 );

Где используется хук в 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 54
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' );