By platform

WooCommerce cart empty after adding product

Add to cart looked like it worked, and the cart still says empty. Mimiq sends simulated visitors through the same click and shows the step where the item goes missing.

5 visitors try to .
First test free with an accountRun it from your coding agent

Why is my cart empty after adding a product on WooCommerce?

The cart is stored on your server, and the browser holds a cookie that ties it to that cart. Adding a product and opening the cart are two separate requests, and the cart comes back empty when the cookie is not sent, when a cache returns an empty cart page, or when the add request never runs because a script fails. Check the cookie, the cache header and the console on the click to see which one applies. A simulated test shows the step where the cart empties.

What this looks like in a report

Who
Maren, knitting a winter sweater and one skein short
How they arrived
Clicked a newsletter link and opened a product page on her phone
Where they stopped
Cart page, right after Add to cart

“The button changed to View cart, so I thought it worked. Now the cart says it is empty. Maybe this skein is out of stock and nobody told me.”

The fix. Exclude the cart, checkout and account pages from page caching, and redirect the site to one address so the session cookie stays with every page. Then add an item in a private window and open the cart to confirm it holds the item.

An illustration. Run a test to see your own.See a real sample report

The cart cannot find the item on the next request

The add step and the cart step are two separate requests. WooCommerce stores the cart on the server and gives each browser a session cookie, named wp_woocommerce_session plus a code. The add step saves the item under that session. If the cookie is missing, blocked, or set on a different address from the one the cart loads from, the cart reads as new and empty. If a cache answers the cart page for a visitor with no session, it shows an empty cart although the item is stored. If a script on the product page fails, the add request never reaches the server and nothing is stored.

  • After you add an item, look for a cookie starting with wp_woocommerce_session in the storage panel for your domain.
  • Open the cart page's response headers and look for a cache header, such as x-cache or cf-cache-status, that says HIT.
  • Look for an add-to-cart request, usually with wc-ajax=add_to_cart or add-to-cart= in its address, and a success response.
  • Read the console on the product page for script errors that appear at the moment you click Add to cart.
  • Confirm the store answers on one address only, so the cookie is not set on www and read on the bare domain.

The order the shopper meets the failure

The shopper opens a product page and clicks Add to cart. The button might change to View cart, a notice might appear above the product, or the header count might go up. Then the shopper opens the cart from the header icon or a link in the notice. The cart says it is empty, or shows nothing, and the header count reads zero. Some shoppers click once more, then try checkout, which also reports an empty cart, and leave. Your server logs usually show no error. The cart simply did not get the item back on the next request.

Three causes that look the same from outside

A missing cookie, a cached cart page and a click script that never ran all end with an empty cart, so the symptom alone cannot tell them apart. A cookie problem shows in the browser's storage panel: after you add an item there is no wp_woocommerce_session cookie for your domain, or the cookie sits on www while the cart loads from the bare address. A cache problem shows in the cart page's response headers, where a cache reports HIT, and the cart looks empty while the item is stored. A script problem shows in the console when you click, or as no add-to-cart request in the network panel. Check them in that order.

A consent banner is a common reason the cookie is missing. Many banners block non-essential cookies until the visitor accepts, and a shopper who declines may never get a session. The banner often appears on the product page itself, so the first click may happen before the shopper has answered it. Test the cart once with the banner accepted and once declined, in a private window each time.

The cart step, its screenshot and the errors recorded there

A simulated test sends visitors to the product page, has each one click Add to cart, and then has them open the cart. Each visitor works in a real browser, so the report shows the step where the cart went empty, a screenshot of that step, and the script errors and failed or slow requests recorded there. That tells you where the flow broke and what the browser saw. It does not say which cause is behind it, and a test browser does not carry your shoppers' cookie settings. Use the report to pick the step, then the checks above to pick the cause.

If the cart only empties after login, the test needs an account to sign in with. With paid credits, visitors can sign in with a test account you give them. A checkout test goes up to the payment step and stops there, because visitors cannot pay with a real card. Check the payment itself in your payment provider's test mode, with its published test card numbers.

Mimiq is independent and not affiliated with the platforms it names. Names belong to their owners.

What you get with Mimiq

  1. 01

    Run it by hand, or on every pull request

    Paste a link and a task in the app and watch the visitors work. Or run them on every preview deploy: the GitHub Action comments on the pull request, any other CI can call the MCP endpoint, and your coding agent can run it too.

  2. 02

    Bugs and usability problems in one report

    The browser records errors and failed or slow requests on the step they happened. The visitors say where the wording or the steps confused them, and where they left.

  3. 03

    Visitors that behave like your audience

    Each visitor is a different profile with a reason to be there, matched to who the page is for, described by you, or built from your own customers.

  4. 04

    A prompt to fix each problem

    Every problem comes with a fix to paste into Cursor, Claude Code, Lovable or any coding agent, and one prompt hands over the top problems at once. Then send the same visitors through again.

  5. 05

    Follow every visitor

    See each visitor's whole path, step by step with screenshots, and what it was thinking at every step. Ask any visitor a question.

The browser records relevant JavaScript errors and failed or slow app requests encountered during the run, attached to the step where they occurred. The visitors are simulated: they find problems, they do not predict how many real people will convert.

A cache or consent banner change can empty the cart again

A cart break comes back. A cache rule changes, a plugin updates, or a new consent banner blocks the session cookie. After each change, run the same visitors through Add to cart and the cart before the next ad campaign sends traffic. The second run shows whether the step that broke now works.

Starter

Try it on one launch

$9 once
120 credits, never expire

About 4 tests of 5 visitors

  • Visitors on your landing page, signup and checkout
  • Where they left and why, with a fix to copy for each problem
  • Run it in the app or on every pull request
  • Ask any visitor a question, included
  • Test accounts and protected previews
Buy 120 credits

Builder

Test every build

$19 a month
500 credits every month

About 20 tests of 5 visitors

  • Everything in Starter
  • Credits refill each month, and what is left rolls over once
  • Cancel anytime
Choose Builder

Pro

Test every release, as a team

$49 a month
1,500 credits every month

About 60 tests of 5 visitors

  • Everything in Starter
  • Credits refill each month, and what is left rolls over once
  • Cancel anytime
Choose Pro

Scale

Test at scale, every day

$149 a month
6,000 credits every month

About 240 tests of 5 visitors

  • Everything in Starter
  • Credits refill each month, and what is left rolls over once
  • Priority support
  • Cancel anytime
Choose Scale
$0for your first test, with a free account (Google sign-in, no card). It includes 50 credits, enough for 10 visitors. After that a visitor uses 5 credits, and packs start at $9 for 120 credits.
See a sample report

Questions

Why does the header show the item but the cart page is empty?

The header count is updated by the page's script right after the click. The cart page is a new request that reads the cookie and the cache. When they disagree, trust the cart page, because checkout reads the same stored cart.

Will clearing my browser cache fix it?

Only for your own browser. A shopper with no session still gets whatever a server or CDN has cached for the cart address. Clear the store's site data and retest in a private window. The lasting fix is a cache rule that skips the cart, checkout and account pages.

Does this happen only to logged-in customers?

It can. A cart can look different before and after login, so test both states. A cart saved to an account can differ from the guest cart a shopper just filled. A logged-in test needs a test account, which visitors can use with paid credits.

Can the simulated test tell me which cause it is?

No. It shows the step where the cart went empty, a screenshot, and any script error or failed request recorded on that step. Which cause it is takes the cookie, header and console checks in your own browser. A test does not predict how many real shoppers buy.

Does the test complete a purchase?

No. It goes up to the payment step and stops there. Visitors cannot pay with a real card, so check a payment that fails at the last step in your payment provider's test mode.

Keep reading

Send visitors and see what breaks first.

Your first test is free: sign in with Google and it starts right away. Last checked 2026-11-02.

5 visitors try to .