Automattic\WooCommerce\Blocks\Templates

ArchiveProductTemplatesCompatibility::is_block_inherited()privateWC 1.0

Check if block has isInherited attribute asigned

Method of the class: ArchiveProductTemplatesCompatibility{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->is_block_inherited( $block );
$block(array) (required)
Parsed block data.

ArchiveProductTemplatesCompatibility::is_block_inherited() code WC 8.9.0

private function is_block_inherited( $block ) {
	$attributes = $block['attrs'];

	$outcome = isset( $attributes['isInherited'] ) && 1 === $attributes['isInherited'];

	return $outcome;
}