Automattic\WooCommerce\Blocks\Templates

ProductCategoryTemplate::render_block_templatepublicWC 1.0

Run template-specific logic when the query matches this template.

Метод класса: ProductCategoryTemplate{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$ProductCategoryTemplate = new ProductCategoryTemplate();
$ProductCategoryTemplate->render_block_template();

Код ProductCategoryTemplate::render_block_template() WC 11.0.1

public function render_block_template() {
	if ( ! is_embed() && is_product_taxonomy() && is_tax( 'product_cat' ) ) {
		$compatibility_layer = new ArchiveProductTemplatesCompatibility();
		$compatibility_layer->init();

		add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
	}
}