Automattic\WooCommerce\Blocks\Templates

ArchiveProductTemplatesCompatibility::is_null_post_template()privateWC 1.0

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.

Return

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() code WC 9.4.2

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 ) );
}