woocommerce_use_block_notices_in_classic_theme хук-фильтрWC 8.8.0

Allow classic theme developers to opt-in to using block notices.

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

add_filter( 'woocommerce_use_block_notices_in_classic_theme', 'wp_kama_woocommerce_use_block_notices_in_classic_theme_filter' );

/**
 * Function for `woocommerce_use_block_notices_in_classic_theme` filter-hook.
 * 
 * @param bool $use_block_notices_in_classic_theme Whether to use block notices in classic theme.
 *
 * @return bool
 */
function wp_kama_woocommerce_use_block_notices_in_classic_theme_filter( $use_block_notices_in_classic_theme ){

	// filter...
	return $use_block_notices_in_classic_theme;
}
$use_block_notices_in_classic_theme(true|false)
Whether to use block notices in classic theme.

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

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

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

Notices::init()
woocommerce_use_block_notices_in_classic_theme
woocommerce/src/Blocks/Domain/Services/Notices.php 54
if ( wp_is_block_theme() || apply_filters( 'woocommerce_use_block_notices_in_classic_theme', false ) ) {

Где используется хук в WooCommerce

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