Automattic\WooCommerce\Blocks\Templates

SingleProductTemplateCompatibility::is_custom_html()private staticWC 1.0

Plain custom HTML block is parsed as block with an empty blockName with a filled innerHTML.

Метод класса: SingleProductTemplateCompatibility{}

Хуков нет.

Возвращает

true|false.

Использование

$result = SingleProductTemplateCompatibility::is_custom_html( $block );
$block(массив) (обязательный)
Parse block.

Код SingleProductTemplateCompatibility::is_custom_html() WC 9.0.2

private static function is_custom_html( $block ) {
	return empty( $block['blockName'] ) && ! empty( $block['innerHTML'] );
}