Articles on: Technical Support

Updating WooCommerce Cart Settings

If you're using WP Compress with Cloudflare and WooCommerce, you may notice items added to the cart disappear when navigating to another page, or the cart count showing incorrect values. This is caused by Cloudflare caching pages it shouldn't — specifically the add-to-cart request — before session cookies can be set on the browser.


The fix is straightforward in most cases.



Step 1: Enable AJAX Add to Cart


AJAX add to cart is the safest method to use alongside any caching setup — it fires as a background request that is never cached, completely avoiding this issue.



In WooCommerce:


  1. Go to WooCommerce > Settings > Products
  2. Enable Add to cart buttons on archives via AJAX


If your theme or page builder has its own add to cart settings, check those too and ensure AJAX is selected wherever available.



Step 2: Refresh Your Cloudflare Connection


Refreshing the connection will update your cache rules to correctly exclude WooCommerce cart, checkout, and session URLs from being cached.


  1. Go to your WP Compress dashboard
  2. Navigate to the Cloudflare integration settings
  3. Click Refresh Connection


After refreshing, always purge the cache to clear any incorrectly cached pages.


Still Having Issues?


If your cart is still not working correctly after these steps, start a live chat with our support team. We can review your Cloudflare cache rules directly and identify any remaining exclusions needed for your specific setup.

Updated on: 03/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!