New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Cart

Learn how to fix WooCommerce cart not updating.

The cart looks simple but depends on PHP sessions, cookies, and AJAX fragments. When Add to cart works but quantities stick, or the mini-cart shows the wrong count, the fault is usually caching, session storage, or JavaScript from your theme.

Time: 20-40 minutes Level: Intermediate
Neil McNaught, founder of BugShield and WordPress author
Written by
Written by
Updated
Updated

What this problem looks like

Cart update failures show up as frozen quantity fields, a mini-cart that never refreshes, or products that vanish on the next page load. The underlying cart data in WooCommerce is often fine; the browser never receives the updated fragment.

Object caching plugins that cache WooCommerce sessions are a frequent cause on managed WordPress hosts. Page cache that stores the cart page HTML is another.

Step 1: Symptoms that narrow the cause

If add-to-cart redirects but the cart page is empty, sessions are not persisting. If the cart page shows items but the header mini-cart is wrong, fragment AJAX or theme JavaScript is failing.

  • Quantity plus and minus buttons do nothing: theme JS conflict.
  • Cart clears on every page: cookie or session misconfiguration.
  • Wrong totals after coupon: see coupon tutorial or tax settings.

Step 2: Flush permalinks and verify page IDs

Go to Settings → Permalinks in wp-admin and click Save without changing anything. Then open WooCommerce → Settings → Advanced and confirm Cart and Checkout pages are set and published.

Step 3: Exclude cart from every cache layer

Cart and checkout must bypass full-page cache. Also disable cart fragment caching in optimisation plugins. Some themes cache mini-cart HTML in transients; clear theme caches from the theme panel if one exists.

Add this to wp-config.php in your site root only during diagnosis:

php
define( 'WP_REDIS_DISABLED', true );

Step 4: Debug AJAX cart fragments

Open DevTools → Network, add a product, and watch for requests to ?wc-ajax=get_refreshed_fragments or admin-ajax.php. A 403 forbidden or 500 internal server error response often means a security plugin or mod_security rule is blocking WooCommerce AJAX.

Step 5: Hosting session and cookie checks

PHP sessions must be writable on the server. Ask your host if session.save_path is misconfigured on your plan. Ensure your site forces HTTPS so the woocommerce_cart_hash cookie is not blocked as third-party or insecure.

Cookie consent plugins that block functional cookies before acceptance will break cart persistence for new visitors in the EU and UK.

Step 6: Isolate plugin conflicts

Rename wp-content/plugins to plugins.disabled via File Manager, SFTP, or FTP. If the cart updates correctly, rename the folder back and activate plugins one at a time in wp-admin until the cart error returns.

When to stop DIY and hire help

Call a developer when cart issues persist on a default theme with caching disabled, when session tables grow millions of rows, or when multisite or headless setups are involved. BugShield fixes cart and session bugs at a confirmed price without hourly billing surprises.

Questions answered

WooCommerce cart not updating FAQs

Answers about sessions, cookies, cache exclusions, AJAX requests, object caching, and checking that basket changes persist.

Why does my WooCommerce cart empty at checkout?

Different domains between cart and checkout, session cookie blocked, or cache serving an old empty cart page. Confirm one canonical domain with HTTPS throughout.

Can Redis break the WooCommerce cart?

Misconfigured Redis object cache can cache user sessions incorrectly. Use a WooCommerce-aware Redis setup or exclude session keys per your host documentation.

How do I clear WooCommerce cart sessions?

WooCommerce → Status → Tools → Clear customer sessions clears expired sessions safely. Avoid manual TRUNCATE on live shops without backup.

Does a CDN break add to cart?

Only if HTML or AJAX responses are cached. Bypass cache for logged-in users, cart, checkout, and WooCommerce AJAX endpoints.

What causes a WooCommerce cart not to update?

Cached cart pages, blocked cookies, broken AJAX, stale cart fragments, object-cache conflicts, theme overrides, or plugins changing sessions and prices can prevent updates.

Which WooCommerce pages should be excluded from cache?

Exclude cart, checkout, My Account, add-to-cart requests, and WooCommerce session cookies at every page-cache, server-cache, and CDN layer.

Why does the WooCommerce cart fail only for logged-out customers?

Guest carts depend on browser cookies and WooCommerce sessions. Consent settings, cache rules, security tools, or domain mismatches may block or separate those cookies.

How do I inspect a failed WooCommerce add-to-cart request?

Open browser Network tools, add a product, and inspect the AJAX or page request, response status, cookies, redirects, and any JavaScript error.

Can an object cache make WooCommerce carts show the wrong contents?

Yes, if sessions or customer-specific responses are cached incorrectly. Verify Redis or Memcached exclusions and clear stale objects after correcting the configuration.

How do I verify a WooCommerce cart fix?

Test simple and variable products, quantity changes, removal, coupons, shipping, login transitions, mobile view, and checkout in a fresh logged-out browser session.

Would you rather a developer fixed it?

Request a fix at a confirmed price and speak directly with the BugShield developer working on your site.

Request a Fix