diff --git a/src/Templates/SingleProductTemplateCompatibility.php b/src/Templates/SingleProductTemplateCompatibility.php index ef7d3fa9204..09f48171b34 100644 --- a/src/Templates/SingleProductTemplateCompatibility.php +++ b/src/Templates/SingleProductTemplateCompatibility.php @@ -282,7 +282,9 @@ function( $carry, $item ) { * @return array Wrapped template content inside a div. */ private static function wrap_single_product_template( $template_content ) { - $parsed_blocks = parse_blocks( $template_content ); + $parsed_blocks = parse_blocks( $template_content ); + do_action( 'qm/debug', $parsed_blocks ); + $grouped_blocks = self::group_blocks( $parsed_blocks ); $single_product_template_blocks = array( 'woocommerce/product-image-gallery', 'woocommerce/product-details', 'woocommerce/add-to-cart-form', 'woocommerce/product-meta', 'woocommerce/product-price', 'woocommerce/breadcrumbs' ); @@ -433,7 +435,7 @@ function( $carry, $block ) { $carry[] = array( $block ); return $carry; } - if ( empty( $block['blockName'] ) && empty( $block['innerContent'] ) ) { + if ( empty( $block['blockName'] ) && '' === $block['innerHTML'] ) { return $carry; } $last_element_index = count( $carry ) - 1;