How can I show an empty WooCommerce cart? [closed]
IT Nursery
May 28, 2022
0
I’ve made a single-page checkout template for donations. The donation plugin is attached to the cart and will update the cart properly, however the cart will not display on my page if 0 items are in the basket when the user arrives. The intended end user will generally have no items in their cart.
How can I force the WooCommerce cart to show up if there are no products in the cart?
1 Answer 1
global $woocommerce;
$count = $woocommerce->cart->cart_contents_count;
This should be the variable you’d want to work with. Try var_dump on this to display its value.