WooCommerce add to cart not working, or the cart is empty? Four causes we reproduced
In short
WooCommerce add to cart is not working when the product cannot be bought (no price, out of stock, no variation chosen) or when the cart page reads another session, from a cache or a second host name. In our 17 Oct 2026 lab one cart held an item on one host name and none on the other.
Seeing this on your own site? Send us the address for a free site check, and a written report comes back within 2 business days.
Key points
- A product with no price shows "Read more" in the shop, not "Add to cart", and a direct add says "Sorry, this product cannot be purchased."
- An out of stock product refuses the add by name, and a variable product with no size chosen asks for the options first.
- In our lab the cart held one $20.00 item at 127.0.0.1 and was empty at localhost, with the same cookies. To a browser, www and non-www are two host names in the same way.
- WooCommerce's docs say to keep the cart, checkout and account pages out of the cache. A cached cart page gives every buyer the same stored copy, often an empty cart.
On this page (11)
- Why is WooCommerce add to cart not working?
- How did we test it?
- What does the shop page show when a product cannot be bought?
- What happens when a buyer adds it anyway?
- Why is the cart empty after the item was added?
- Can caching empty the cart?
- What about JavaScript errors?
- How do you fix WooCommerce add to cart not working?
- What did we not test?
- Is your cart empty right now?
- Questions and answers
Why is WooCommerce add to cart not working?
When WooCommerce add to cart is not working, the reason is one of two kinds. Either the product cannot be bought as it stands, or the add works and the cart page then reads a different session.
The first kind shows a notice or a “Read more” button. The second is quieter: the buyer clicks, sees a tick or a message, and opens an empty cart.
Faults like this are part of our WooCommerce store fixes, where we trace the cart on a copy of the store before anything changes on the live one.
How did we test it?
Our test store ran on WordPress Playground on 17 Oct 2026: WooCommerce 11.2.1 on WordPress 7.1.3, PHP 8.3.33, Twenty Twenty-Five, and the Cart and Checkout blocks a fresh install sets up.
It had four products. A $20.00 mug, the same mug with no price, the same mug marked out of stock, and a $25.00 tee in sizes S and M. We added each one as a guest and read the cart back through WooCommerce’s own Store API.
What does the shop page show when a product cannot be bought?
The button changes before anyone clicks. These were the labels on our shop page:
| Product | Shop button |
|---|---|
| $20.00 mug | Add to cart |
| Mug with no price | Read more |
| Mug out of stock | Read more |
| Tee with sizes | Select options |
So if your shop says “Read more” where you expect a cart button, open that product. Usually the price field is blank or the stock status says out of stock.
What happens when a buyer adds it anyway?
A link or an old button can still send the add. WooCommerce then refuses it with a notice on the product page:
| Product | Notice |
|---|---|
| No price | “Sorry, this product cannot be purchased.” |
| Out of stock | You cannot add “Lab Mug Sold Out” to the cart because the product is out of stock. |
| Tee, no size chosen | “Please choose product options for Lab Tee.” |
After those three tries the cart held zero items. If a theme hides store notices, the buyer sees none of these lines and only an empty cart.
Why is the cart empty after the item was added?
The cart lives in a session tied to a cookie, and a browser sends a cookie only to the host name that set it.
We added the $20.00 mug at 127.0.0.1, the store’s own address. The cart there held one item, total $20.00. We then asked for the cart at localhost, the same store on a second name, with the same cookies. It answered with zero items.
On a live store the two addresses are usually www and non-www, or http and https. A menu link, a button or a redirect that jumps from one to the other drops the buyer into an empty cart. The fix is one address: set WordPress Address and Site Address to the same version and redirect the other one to it.
Can caching empty the cart?
Yes, though we did not test a caching plugin in this lab. WooCommerce’s guide to caching plugins says to exclude the cart, checkout and my account pages from the cache, because they show one buyer’s own details.
When they are, every buyer gets the stored copy of the page, which is often an empty cart, or someone else’s mini cart count. Check the exclusions in your caching plugin and at your host or CDN, then clear the cache.
What about JavaScript errors?
The shop button adds by AJAX when that setting is on, which it was on our fresh store. A script error from a theme or plugin can stop the click from doing anything at all.
Open the browser console on the shop page, click the button, and look for a red error. If one appears, switch to a default theme on a staging copy and try again. We did not reproduce this one, so treat it as the next check after the ones above.
How do you fix WooCommerce add to cart not working?
Work through it in this order:
- Read the shop button. “Read more” means fix the price or the stock.
- Try the add on the product page and read the notice.
- Check that the site answers on one host name only.
- Exclude cart, checkout and my account from every cache.
- Check the console for script errors, then test with a default theme on staging.
We take this on as a single job. On a staging copy we add a product as a guest, follow its session across your host names and caches, and hand back what broke and what we changed.
A cart that fills but then fails at the shipping step is a different fault, traced in WooCommerce “No shipping options were found”. One that stops at payment is in WooCommerce checkout not working. A store still behind its holding page is covered in WooCommerce coming soon mode.
What did we not test?
- Caching plugins, host caches and CDNs.
- Theme or plugin JavaScript errors.
- Payment plugins, including Stripe.
Is your cart empty right now?
Send us the product link and what the buyer sees after the click, and we will name the cause from this list that matches.
Rather start with a second opinion? Ask for the free site check with your store address, and a written reply comes within 2 business days. Already know the fault? Our list of one-off fixes has it.
Where did these facts come from?
- DistroCode lab, WooCommerce 11.2.1 on WordPress 7.1.3, PHP 8.3.33 (17 Oct 2026, 1:49 to 1:52 PM ET), add to cart notices and Store API cart counts per host name, checked Oct 17, 2026
- WooCommerce developer docs, Configuring caching plugins (exclude Cart, My Account and Checkout from the cache), checked Oct 17, 2026
- WooCommerce docs, Adding and managing products (simple and variable), checked Oct 17, 2026
- WooCommerce docs, Store API cart endpoint, checked Oct 17, 2026
Questions and answers
Why does my shop show "Read more" in place of "Add to cart"?
WooCommerce shows "Read more" when the product cannot be bought as it stands. In our lab that happened for a product with no price and for one marked out of stock.
Why is my WooCommerce cart empty after I add a product?
The add worked but the cart page did not read the same session. The usual reasons are a cached cart page or a site that answers on two host names, such as www and non-www.
Does a variable product need a choice before it goes in the cart?
Yes. A direct add without a size in our lab gave "Please choose product options for Lab Tee." and the cart stayed at zero items.
Still stuck? Send us the page address and what you see Want to know if the problem stops here? Ask for the free site check.
We write up one real fix or build a few times a week on LinkedIn. Follow DistroCode there: linkedin.com/company/distrocode


