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 );