Automattic\WooCommerce\Blocks\Templates
SingleProductTemplateCompatibility::is_custom_html()
Plain custom HTML block is parsed as block with an empty blockName with a filled innerHTML.
Method of the class: SingleProductTemplateCompatibility{}
No Hooks.
Return
true|false
.
Usage
$result = SingleProductTemplateCompatibility::is_custom_html( $block );
- $block(array) (required)
- Parse block.
SingleProductTemplateCompatibility::is_custom_html() SingleProductTemplateCompatibility::is custom html code WC 9.4.2
private static function is_custom_html( $block ) { return empty( $block['blockName'] ) && ! empty( $block['innerHTML'] ); }