From acc57ec8531eb410fe9ee380f95a482ffea4a03a Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 1 Oct 2019 14:28:31 -0300 Subject: [PATCH] Introduced "woocommerce_output_cart_shortcode_content" filter --- includes/shortcodes/class-wc-shortcode-cart.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/shortcodes/class-wc-shortcode-cart.php b/includes/shortcodes/class-wc-shortcode-cart.php index 2f3b8d5d88b..15f25b2ab00 100644 --- a/includes/shortcodes/class-wc-shortcode-cart.php +++ b/includes/shortcodes/class-wc-shortcode-cart.php @@ -67,6 +67,10 @@ class WC_Shortcode_Cart { * @param array $atts Shortcode attributes. */ public static function output( $atts ) { + if ( ! apply_filters( 'woocommerce_output_cart_shortcode_content', true ) ) { + return; + } + // Constants. wc_maybe_define_constant( 'WOOCOMMERCE_CART', true );