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.
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.