A Guide to WooCommerce Hide Mini-Cart Widget (Dropdown)

Do you want your customers to add just one product to cart & checkout? If yes, then you can make it happen with WooCommerce Hide Mini-Cart Widget (Dropdown). So, as soon as the customer adds one product to cart, he/she will be redirected to the checkout page. 

As we can see, you do not need the whole ‘Mini-Cart Widget Dropdown Content’ in this scenario. The good news is that it can be done by fixing one simple PHP snippet. In the end, you can try ‘hover’ on the shopping cart to check whether it still shows cart dropdown or not. 

PHP Snippet: WooCommerce Hide Mini-Cart Widget Dropdown appearing at WooCommerce header

add_filter( 'woocommerce_widget_cart_is_hidden', '__return_true' );

Where to add the Snippet?

You can put it in two places. One way to put above PHP snippet is at the end bottom of your child theme functions.php file (delete “?>” if you have any). In another way, CSS is supposed to go in your child theme style.css file.  

Also Read, A Detailed Guide on Storefront theme Edit or Remove Footer Credits

WooCommerce Rename ‘Add to Cart’ Button if product already added at cart