Automattic\WooCommerce\Blocks\Templates
ArchiveProductTemplatesCompatibility::is_null_post_template
The core/post-template has two different block names:
- core/post-template when the wrapper is rendered.
- core/null when the loop item is rendered.
Method of the class: ArchiveProductTemplatesCompatibility{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->is_null_post_template( $block );
- $block(array) (required)
- Parsed block data.
ArchiveProductTemplatesCompatibility::is_null_post_template() ArchiveProductTemplatesCompatibility::is null post template code WC 10.8.1
private function is_null_post_template( $block ) {
$block_name = $block['blockName'];
return 'core/null' === $block_name && ( $this->is_block_inherited( $block ) || $this->is_block_within_namespace( $block ) );
}