tadrik Free store check

Guides / WooCommerce

WooCommerce Checkout Not Working: How to Find and Fix It

Updated

Customers click Place Order and nothing happens, or the page spins and never finishes. Every hour of a broken checkout is lost sales, so work in this order: see which request fails, then fix the layer that fails it. Most of the time it is a cache, a firewall rule, a plugin or theme clash, or a PHP error.

1. Make it fail on purpose, safely

Back up the site first. Use a test copy of the store, or put your payment gateway in test mode. Pick one in-stock product, no coupon, and repeat the same address, shipping method and payment method after every change. Test in a private window while logged out, as a customer would.

Also note which checkout you have. Go to WooCommerce, Settings, Advanced and look at the page set as Checkout. It uses either the Checkout block or a Classic Shortcode block. Do not switch between them as a first step.

2. Read the failing request

Open your browser's developer tools, go to the Network tab, choose Fetch/XHR, tick Preserve log, and click Place Order. Find the red or slow request and match it:

  • Pending, never finishes: slow PHP, slow database work, an outside service (tax, shipping, payment) or hosting limits.
  • 403: a firewall or security rule, or an expired security token (nonce).
  • 404: a wrong address, broken permalinks or a proxy route that moved.
  • 500: a PHP fatal error. Look at the logs at the same time (step 6).
  • A web page or login page instead of data, or a redirect: a cache, a security layer or a PHP warning is in the way.
  • Blocked, mixed content or cross-origin: the address uses http in one place and https in another, or the domain differs (www or not).

If it fails after Place Order, look in WooCommerce, Orders. An order may already exist.

3. Check the site addresses and HTTPS

Go to Settings, General and compare the WordPress Address and Site Address with the address customers see. Look for an old domain, a www difference, or http on an https page. Ask your host before you change them. Do not make the two addresses identical just to test checkout.

4. Keep checkout out of every cache

Cart, Checkout and My Account show one customer's data, so they must never be served from a cache. Exclude them in your caching plugin, and in any CDN, firewall or reverse proxy in front of the store. Those layers must also pass WooCommerce AJAX and Store API requests through without a stored answer. Then clear every cache layer and test again.

A reply that is only -1 points to a failed security-token check, which a cached checkout page often causes.

5. Look for a script or plugin clash

In the browser Console, note the first error that is about checkout. If a script was blocked, check a cookie-consent tool, a content security policy, an optimization or minify setting and browser extensions. Then run the standard conflict test on a test copy:

  1. Update plugins, WooCommerce, WordPress and the theme, in that order, after a backup.
  2. Switch to a default theme such as Storefront. If checkout works, the theme is the cause.
  3. Turn off every plugin except WooCommerce and the payment gateway. If checkout works, turn plugins back on one at a time, testing each time, until it breaks.

A fatal error message usually names the plugin or theme file in its path.

6. Read the logs

Go to WooCommerce, Status, Logs and open the log with the time of your test, including any fatal-errors log. Also download the System Status Report from WooCommerce, Status and look at items shown in red. If you see a memory limit error, ask your host to raise the limit. If the request never reaches WordPress, ask your host to check the web server, PHP and firewall logs.

7. If it breaks only after Place Order

When the page stalls after the click, the order is often being created and something after it is slow: the payment gateway, a fraud or tax service, a webhook or an email. Check each service's test mode, its own log and its status page. If your host or developer confirms that email is the slow part, there is a Deferred emails option under WooCommerce, Settings, Advanced, Features. Afterwards check WooCommerce, Status, Scheduled Actions that the queued jobs finish.

8. Prove it is fixed

Totals and payment methods load, the old error is gone, and a test-mode order creates exactly one order. Put back any unrelated setting you changed during the tests.

How to stop it happening again

  • Test a checkout order after every update, not just a page view.
  • Run updates on a test copy first. Our free Safe Updates plugin places a test order after every update and puts the old version back if checkout stopped.
  • Keep cache and firewall rules for Cart, Checkout and My Account written down, so a new plugin or host change does not undo them.
  • After an update that took the whole site down, see the guide on the error screen after an update.

When to ask us

If you have been through these steps and the checkout still fails, or you cannot afford more lost orders while you test, we can find the failing request and fix it. Get it fixed and send us the first console error and the time of a failed test.

Common questions

Is it safe to test on my live store? Only with a test payment method and one in-stock product. Real gateways take real money, so switch them to test mode or work on a test copy of the store.

A customer says they paid but I see no order. What now? Check WooCommerce, Orders first, including drafts and failed orders. Then check the payment gateway's own dashboard. If the money was taken and there is no order, ask the gateway for the transaction and match it by hand.

Should I switch from the block checkout to the classic checkout? Not as a first step. Find the failing request first. Switching hides the problem and can break other settings.

Why does it work for me but not for customers? You are logged in and your browser is warm. A cached page, a firewall rule or a script blocked for new visitors only breaks for them. Test in a private window while logged out.