Automattic\WooCommerce\Blocks\Templates
ClassicTemplatesCompatibility::set_filterable_product_data()
This method passes the value has_filterable_products to the front-end for product archive pages, so that widget product filter blocks are aware of the context they are in and can render accordingly.
Метод класса: ClassicTemplatesCompatibility{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ClassicTemplatesCompatibility = new ClassicTemplatesCompatibility(); $ClassicTemplatesCompatibility->set_filterable_product_data();
Код ClassicTemplatesCompatibility::set_filterable_product_data() ClassicTemplatesCompatibility::set filterable product data WC 9.3.1
public function set_filterable_product_data() { global $pagenow; if ( is_shop() || is_product_taxonomy() || 'widgets.php' === $pagenow ) { $this->asset_data_registry->add( 'hasFilterableProducts', true ); } }