> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.wpcompress.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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.

![](https://wpcompress.com/wp-content/uploads/2026/03/Zight-2026-03-02-at-9.02.40-PM.png)

**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.