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.

problem-with-removing-items-from-woocommerce-cart

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.

disable-set-expires-header-in-w3-total-cache-to-solve-woocommerce-cart-issue

If that doesn’t do the trick…

2) Add these page exceptions in Page Cache > Advanced > Never cache the following pages:, like this:

/cart/*
/checkout/*

or

/cart*
/checkout*

w3-total-cache-never-cache-the-following-pages

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!


2 thoughts on “How to Fix the Problem with Removing Items from WooCommerce Cart



Leave a Comment