What matters first: The visible button is only the start of a chain. The browser sends product and variation data, WooCommerce validates it, creates session state and returns fragments or a redirect.
Find the first failing step in Add to cart
Whether the request is absent, rejected or successful without a visible cart update determines the repair path.
What to capture in the browser request
- Watch the browser console and Network panel while clicking Add to cart.
- Record product ID, variation attributes, quantity and response body.
- Check WooCommerce notices and PHP logs for validation or fatal errors.
- Test a simple product with optimisation and cache bypassed.
Validation, session and template causes
- JavaScript conflict: The click handler or fragment update fails before the request.
- Invalid variation: Required attributes or purchasable state do not match.
- Session failure: Cookies or object cache prevent cart persistence.
- Theme override: An outdated template sends wrong fields or markup.
Repair the failing layer, not the button
- Fix the first failing request or JavaScript error, not the button styling.
- Update or correct stale WooCommerce template overrides.
- Exclude cart fragments and AJAX endpoints from incompatible optimisation.
- Test simple, variable and out-of-stock products after the change.
JavaScript failure or invalid variation?
A JavaScript conflict normally stops or corrupts the request before WooCommerce can validate it; an invalid variation reaches WooCommerce but is rejected because attributes, stock or purchasable state do not match. The Network panel, response body and WooCommerce notices tell you which branch you are in. Fix that first failure instead of changing markup until the symptom disappears.
If Add to cart succeeds but the basket later empties, continue with the cart/session diagnostic. If the cart and payment complete but the customer lands on a broken confirmation, use the order-received troubleshooting flow. Those are downstream failures and should not be folded into the Add to cart diagnosis.
Do not bypass purchase validation
Do not force products into the cart by bypassing validation. Stock, variation and purchase rules protect order integrity.
Test products, fragments and totals after the fix
- The intended products and variations enter the cart once.
- Cart count, totals and mini-cart agree after refresh.
- Validation still blocks invalid or unavailable combinations.
The fix is complete when simple and variable products enter the cart exactly once, unavailable combinations remain blocked, cart fragments and totals agree after refresh, and the same behaviour holds with normal optimisation and caching restored.
WP REPAIR INCIDENT STANDARD
Safe intervention sequence
Whether the request is absent, rejected or successful without a visible cart update determines the repair path.
- Watch the browser console and Network panel while clicking Add to cart.
- Record product ID, variation attributes, quantity and response body.
- Check WooCommerce notices and PHP logs for validation or fatal errors.
- Test a simple product with optimisation and cache bypassed.
What must be verified
- The intended products and variations enter the cart once.
- Cart count, totals and mini-cart agree after refresh.
- Validation still blocks invalid or unavailable combinations.
Official technical sources
Continue the diagnosis
This guide explains the diagnosis. If the site is affected now, the intervention should preserve a rollback path and verify the real business journey.
See the emergency repair service →ABOUT THIS SYMPTOM
Frequently asked questions about this guide.
The Add to Cart button visibly reacts but nothing ends up in the cart — where's the fault?+
This points toward the request being sent but rejected, rather than a JavaScript failure before the click registers. Check the Network panel response body and WooCommerce notices or PHP logs for a validation error, since invalid variation attributes or purchasable-state mismatches commonly produce exactly this behavior.
Is it safe to bypass validation to force a product into the cart when it won't add normally?+
No, this is explicitly warned against. Stock, variation and purchase rules exist to protect order integrity, so forcing a product past validation risks selling something that is out of stock or misconfigured rather than fixing the underlying problem.
How do I know if an outdated theme template is the cause instead of a plugin conflict?+
A theme override becomes suspect when a stale template file sends the wrong fields or markup for the current WooCommerce version, which you can confirm by comparing the actual submitted product ID, variation attributes and quantity against what the current template should send.
Does fixing the button's visual style ever actually solve this?+
No. The guide specifically frames the fix as addressing the first failing request or JavaScript error, not the button's styling, since a cosmetically working button gives no information about whether the underlying AJAX chain to validate and persist the cart item is functioning.