Automattic\WooCommerce\Blocks
BlockTemplatesController::remove_block_template_support_for_shop_page()
Remove the template panel from the Sidebar of the Shop page because the Site Editor handles it.
Метод класса: BlockTemplatesController{}
Хуков нет.
Возвращает
true|false
.
Использование
$BlockTemplatesController = new BlockTemplatesController(); $BlockTemplatesController->remove_block_template_support_for_shop_page( $is_support );
- $is_support(true|false) (обязательный)
- Whether the active theme supports block templates.
Заметки
Код BlockTemplatesController::remove_block_template_support_for_shop_page() BlockTemplatesController::remove block template support for shop page WC 8.7.0
public function remove_block_template_support_for_shop_page( $is_support ) { global $pagenow, $post; if ( is_admin() && 'post.php' === $pagenow && function_exists( 'wc_get_page_id' ) && is_a( $post, 'WP_Post' ) && wc_get_page_id( 'shop' ) === $post->ID ) { return false; } return $is_support; }