Automattic\WooCommerce\Blocks\BlockTypes

ProductQuery::is_woocommerce_variation()public staticWC 1.0

Check if a given block

Method of the class: ProductQuery{}

No Hooks.

Return

true|false.

Usage

$result = ProductQuery::is_woocommerce_variation( $parsed_block );
$parsed_block(array) (required)
The block being rendered.

ProductQuery::is_woocommerce_variation() code WC 9.4.2

public static function is_woocommerce_variation( $parsed_block ) {
	return isset( $parsed_block['attrs']['namespace'] )
	&& substr( $parsed_block['attrs']['namespace'], 0, 11 ) === 'woocommerce';
}