Automattic\WooCommerce\Blocks\Templates
ProductAttributeTemplate::render_block_template
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() 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();
}
}