Hide WooCommerce Counter if zero

Hello there,

I just followed through the tutorial to add a counter to a cart icon in the header as seen here:

I was wondering if there was a way to hide the counter if the returned value is zero. Meaning if someone doesn’t have anything in the cart, it just won’t show up. Any way to do that?

-Joe

Hello Joseph,

Thanks for writing to us.

Regretfully there isn’t an option in the element that you can hide it when the cart is empty. This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.