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

Cart

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

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.

Do not delete WooCommerce session tables during troubleshooting unless you have a database backup. Truncating sessions logs everyone out and clears carts.

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.

Flush permalinks and verify page IDs

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

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.

php
// wp-config.php: disable object cache for sessions during diagnosis only
define( 'WP_REDIS_DISABLED', true );
Remove diagnostic constants after testing. Object cache improves performance when configured correctly for WooCommerce.

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 or 500 response often means a security plugin or mod_security rule is blocking WooCommerce AJAX.

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.

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 on live shops without guessing.

FAQs

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.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix