A lot of people are experiencing problems with removing items from the WooCommerce cart while using caching plugins (mainly W3 Total Cache), including us, so we’ve decided to show you how to fix this issue since it’s quite easy.
Note that this fix works for the majority of people, not all; it depends on the case. Also, this guide is for those who are using the W3 Total Cache plugin.
What’s actually the problem with the cart?
The problem is that if you add an item into the cart, but then you want to remove it, it won’t go away; the page just refreshes and the product is still there.
What’s causing this problem?
Well, even though the guys at Woo say that with the implementation of DONOTCACHEPAGE constant, added in the WooCommerce 1.4.2+ versions, the caching plugins won’t cache WooCommerce’s dynamic pages anymore, they still do in some cases.
How to fix the problem with removing the cart item
1) Disable the Set expires header in Browser Cache > General.
If that doesn’t do the trick…
2) Add these page exceptions in Page Cache > Advanced > Never cache the following pages:, like this:
3) If 1 or 2 doesn’t work, then apply them both. Disable the Set expires header and then add the page exceptions. That should do the trick.
Don’t forget to hit Ctrl + F5 (Command + R on Mac) on your browser, so you can refresh the page and override the cache before making a test.
That’s it! Pretty simple and fast, no?
Don’t forget to share and let others know!