Automattic\WooCommerce\Blocks\Templates
ArchiveProductTemplatesCompatibility::is_product_template()
Check whether block is a Product Template.
Method of the class: ArchiveProductTemplatesCompatibility{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->is_product_template( $block_name );
- $block_name(string) (required)
- Block name.
ArchiveProductTemplatesCompatibility::is_product_template() ArchiveProductTemplatesCompatibility::is product template code WC 9.5.1
private function is_product_template( $block_name ) { return 'woocommerce/product-template' === $block_name; }