Less is more (sometimes). On this website, I’m already forcing max 1 product in the Cart and automatically redirecting users to Checkout upon add to Cart.

As a result, I definitely didn’t need the whole “Mini-Cart Widget Dropdown Content” either. To test, try to “hover” onto the shopping cart icon on the top right, and you’ll notice there is no cart dropdown 🙂

Well, this is how it’s done – I love when a complex thing is fixed with one simple line of PHP!

WooCommerce: Hide the Mini-Cart Widget Dropdown Content

PHP Snippet: Hide Menu Mini-Cart Widget Dropdown @ WooCommerce Header


/**
 * @snippet       Hide Menu Mini-Cart Widget Dropdown Content
 * @how-to        Get CustomizeWoo.com FREE
 * @sourcecode    https://businessbloomer.com/?p=73060
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 3.4.3
 */

add_filter( 'woocommerce_widget_cart_is_hidden', '__return_true' );

Share:

Leave a Reply