WooCommerce mini cart is cached and already has a product in it

Problem

When a visitor goes to your site for the first time, the mini-cart seems to be cached and already has an item (or items) in it. Visiting the Cart page itself shows there are no items in the cart, but the widget does not update.

Cause

Cart issues can be related to WP Rocket's optimization of the get_refreshed_fragments request from WooCommerce.

Solution

Install this helper plugin on your site to deactivate that feature:

📥  Download (.zip):  WP Rocket | Deactivate WooCommerce Refresh Cart Fragments Cache
Developers: you can find the code for this plugin on GitHub.

  1. Download the helper plugin zip file 
  2. Install the helper plugin on your site - go to Plugins → Add New → Upload plugin and select the zip file. 
  3. Activate the plugin

If this solution does not work, the issue could be a different one, related to the way the cart widget on your site is coded. Please see this guide for more details.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.