• Hi,

    I have the WooCommerce plugin and Astra 4.0.2 (with a child theme). I have just updated from the legacy header to the new header and footer builder. Now the cart icon shows all of the time, even when it is empty. How can I hide the cart icon when it’s empty?

    I searched on Google but was not able to find any code that works.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @station7,

    See if you find this doc helpful for you.

    Kind regards,
    Herman ??

    Thread Starter station7

    (@station7)

    Hi @bsfherman

    Thanks for your reply. I have seen that (as mentioned I did a lot of Google searching prior to posting) but it does not do what I want. It only removes the quantity number from the shopping cart when empty. It doesn’t remove the entire cart icon.

    I found some other PHP code that sort of works. It is server-side, so it does not work when interacting with the cart via Javascript or Ajax functionality, and you have to reload the page to hide or unhide, but it’s the best I’ve been able to get so far. I was hoping for a complete solution but there may not be one out there.

    Thanks anyway!

    Hi @station7,

    Well, regarding the PHP code you have, that is not working with Ajax, I am not quite sure, however, I guess that how the WooCommerce mini cart works. Maybe it is worth for you to try to ask for some help on the WooCommerce forum.

    Let us know if you need more help, otherwise please mark the topic as Resolved.

    Kind regards,
    Herman ??

    Thread Starter station7

    (@station7)

    @bsfherman

    Thanks for the reply. I have asked the question in WooCommerce. I will update here if I get an answer.

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide cart menu icon when cart is empty’ is closed to new replies.