This commit is contained in:
Alex Florisca 2023-08-30 10:41:34 +01:00 committed by GitHub
parent 44f48e41e9
commit d632ffdfae
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class BlockTemplatesController {
$settings['original_render_callback'] = $settings['render_callback'];
$settings['render_callback'] = function( $attributes, $content ) use ( $settings ) {
// The shortcode has already been rendered, so look for the cart/checkout HTML.
if ( strstr( $content, 'woocommerce-cart-form' ) || strstr( $content, 'woocommerce-checkout-form' ) ) {
if ( strstr( $content, 'woocommerce-cart-form' ) || strstr( $content, 'wc-empty-cart-message' ) || strstr( $content, 'woocommerce-checkout-form' ) ) {
// Return early before wpautop runs again.
return $content;
}