• Resolved orca26

    (@orca26)


    Hello WooCommerce community!

    I added a message which is displayed when the cart is empty (action: woocommerce_cart_is_empty). This message gets displayed correctly when visiting the cart with no items in there.

    But when there are items in the cart and I remove them all, the cart page is eventually completely empty: no items and no empty-cart-message.

    How can I display the empty-cart-message after all items are removed?

    I am using the latest WordPress and WooCommerce version.

    Thank you for any ideas!

    • This topic was modified 3 years, 3 months ago by orca26.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @orca26,

    If I understand correctly, you’re saying that when you visit the cart page and remove a product, without refreshing the page, the cart message doesn’t display. is that right?

    If so, you’ll need to write some JavaScript to add the message dynamically when the cart is updated. WooCommerce will handle updating the cart information dynamically for you but the rest will have to be coded.

    Take care

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Empty cart message not shown when removing item’ is closed to new replies.