Automattic\WooCommerce\Blocks\Templates

ProductAttributeTemplate::render_block_templatepublicWC 1.0

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

Method of the class: ProductAttributeTemplate{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

ProductAttributeTemplate::render_block_template() code WC 11.0.1

public function render_block_template() {
	$queried_object = get_queried_object();
	if ( is_null( $queried_object ) ) {
		return;
	}

	if ( isset( $queried_object->taxonomy ) && taxonomy_is_product_attribute( $queried_object->taxonomy ) ) {
		$compatibility_layer = new ArchiveProductTemplatesCompatibility();
		$compatibility_layer->init();
	}
}