Automattic\WooCommerce\Blocks\Templates

ClassicTemplatesCompatibility::set_php_template_data()publicWC 1.0

This method passes the value is_rendering_php_template to the front-end of Classic themes, so that widget product filter blocks are aware of how to filter the products.

This data only matters on WooCommerce product archive pages. On non-archive pages the merchant could be using the All Products block which is not a PHP template.

{} Это метод класса: ClassicTemplatesCompatibility{}

Хуков нет.

Возвращает

null. Ничего.

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

$ClassicTemplatesCompatibility = new ClassicTemplatesCompatibility();
$ClassicTemplatesCompatibility->set_php_template_data();

Код ClassicTemplatesCompatibility::set_php_template_data() WC 6.9.4

public function set_php_template_data() {
	if ( is_shop() || is_product_taxonomy() ) {
		$this->asset_data_registry->add( 'is_rendering_php_template', true, true );
	}
}