Automattic\WooCommerce\Blocks
BlockTypesController::hide_legacy_widgets_with_block_equivalent()
Hide legacy widgets with a feature complete block equivalent in the inserter and prevent them from showing as an option in the Legacy Widget block.
Метод класса: BlockTypesController{}
Хуков нет.
Возвращает
Массив
. $widget_types An array inluding the WooCommerce widgets to hide.
Использование
$BlockTypesController = new BlockTypesController(); $BlockTypesController->hide_legacy_widgets_with_block_equivalent( $widget_types );
- $widget_types(массив) (обязательный)
- An array of widgets hidden in core.
Код BlockTypesController::hide_legacy_widgets_with_block_equivalent() BlockTypesController::hide legacy widgets with block equivalent WC 8.7.0
public function hide_legacy_widgets_with_block_equivalent( $widget_types ) { array_push( $widget_types, 'woocommerce_product_search', 'woocommerce_product_categories', 'woocommerce_recent_reviews', 'woocommerce_product_tag_cloud', 'woocommerce_price_filter', 'woocommerce_layered_nav', 'woocommerce_layered_nav_filters', 'woocommerce_rating_filter' ); return $widget_types; }