Fix bug with wpautop for the empty cart (https://github.com/woocommerce/woocommerce-blocks/pull/10768)
This commit is contained in:
parent
44f48e41e9
commit
d632ffdfae
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue