Automattic\WooCommerce\Blocks\Templates
ArchiveProductTemplatesCompatibility::is_post_or_product_template
Check if block is either a Post template or a Product Template
Method of the class: ArchiveProductTemplatesCompatibility{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->is_post_or_product_template( $block_name );
- $block_name(string) (required)
- Block name.
ArchiveProductTemplatesCompatibility::is_post_or_product_template() ArchiveProductTemplatesCompatibility::is post or product template code WC 10.6.2
private function is_post_or_product_template( $block_name ) {
return $this->is_post_template( $block_name ) || $this->is_product_template( $block_name );
}