woocommerce_use_block_notices_in_classic_theme
Allow classic theme developers to opt-in to using block notices.
Usage
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.
Changelog
Since 8.8.0 | Introduced. |
Where the hook is called
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 ) ) {