Guide

WooCommerce “There was an error processing your order”: how to find the real error

The message is WooCommerce's fallback: the order request failed and nobody said why. The real error is one click away in the browser, and usually in the logs too.

Updated

The short answer

“There was an error processing your order” is WooCommerce's generic message: the order request failed, and the answer carried no explanation it could show. The usual reasons:

  • a PHP fatal error or notice while the order was being created — often in a plugin hooked into checkout;
  • a payment gateway that errored, timed out or was refused by its provider;
  • a firewall, security plugin or CDN rule that blocked the order request;
  • a cached checkout page with an expired session.

Open the browser's Network tab, place the order again and read the response to the order request. Then check WooCommerce → Status → Logs. Between them they name the cause.

Where the message comes from

When a shopper presses Place order, the checkout sends the form to your server and waits for an answer in a fixed format: success with an address to go to, or failure with a message to show. If the answer is a failure with no message, isn't in that format at all, or never arrives, the checkout has nothing specific to say — so it shows its fallback.

The wording depends on your WooCommerce version and payment plugin. Recent versions add a line asking the shopper to check for charges and review their order history before ordering again; some gateways and older versions end with “Please try again.” The block checkout words its errors differently, but the method below works for both.

If the button does nothing at all, with no message, that is a different fault — read Place order button not working.

First, check nobody was charged twice

The message doesn't mean the payment failed. A gateway can take the money and the error happen afterwards, while WooCommerce reduces stock, sends emails or runs another plugin's code. Before telling a shopper to try again, search WooCommerce → Orders for their email and the gateway's dashboard for their payment. An order left on Pending payment with a captured payment is covered in orders stuck on Pending payment.

How to find the real error

  1. Reproduce it with the developer tools open. In a private window, add a product, fill the checkout, open the developer tools (right-click → Inspect) on the Network tab, and press Place order.
  2. Find the order request. On the classic checkout it is ?wc-ajax=checkout; on the block checkout, /wp-json/wc/store/v1/checkout. Read its status and its Response tab.
  3. Read what came back.
    • 500, or an HTML page saying a critical error occurred — a PHP fatal error. The log names the file.
    • 200, but a PHP Warning, Notice or Deprecated line printed before the JSON — PHP messages are being shown on screen. Set WP_DEBUG_DISPLAY to false and fix the notice.
    • 403, or a page from your host or CDN — a firewall or security rule blocked the request.
    • 502, 504 or a request that ends with no response — a timeout, usually a gateway or another external service that answered too slowly.
    • {"result":"failure"} with no messages — a plugin rejected the order without saying why.
  4. Read the logs. Under WooCommerce → Status → Logs, open the fatal-errors log and your gateway's log (many gateways only write one with debug logging switched on). With WP_DEBUG_LOG on, warnings and notices go to wp-content/debug.log too — how to turn it on safely and read it.
  5. Isolate a plugin if the logs are silent. The Health Check & Troubleshooting plugin switches off plugins and the theme for your browser only. Place a test order with only WooCommerce and the gateway active, then add the rest back one at a time.

The usual causes, and the fix for each

  • A plugin that runs during checkout — invoicing, shipping labels, CRM sync, stock sync — throws a fatal error. Update it, roll it back, or ask its author with the log line in hand. It often starts after an update.
  • The payment gateway: expired or rotated API keys, test keys on a live store, a provider's request that times out, or a currency or country the account doesn't support. The gateway log says which.
  • PHP output in the response. A notice printed on screen breaks the answer the checkout expects. Common after a PHP version upgrade.
  • A firewall or security plugin that flags the order request — a rule update, a country block, or a rate limit set too tight.
  • Server limits — memory exhausted or a maximum execution time reached while the order is created. The fatal error log names the limit.
  • Caching of the cart or checkout page, which hands shoppers an expired session and security token. Exclude cart, checkout and my-account from page caching.

If the error only appears for some shoppers, it may be caught by your gateway's risk rules rather than your store — and a sudden wave of failed checkouts from strangers can be bots: see card testing attacks.

Seeing it in StorePilot

Shoppers who meet this message rarely write in; they try once more and leave. StorePilot shows you the error behind it without waiting for a complaint:

  • PHP and JavaScript errors are grouped into issues, with how many visits by people they reached. On the classic checkout, a PHP fault raised while an order was being placed is linked to that checkout's visit, so you can open the replay.
  • The steps before the error list the requests the page made to your own site — with their status and WooCommerce's wc-ajax route — and the clicks on the way in.
  • A new-error alert by email, Slack, Telegram or webhook says how many people met it, and — when the fault was on the checkout and the visit left an unpaid basket — the money at risk.
  • The Checkouts tab separates shoppers who were blocked by an error on the checkout page from those who changed their mind.

Install the WordPress plugin — no theme or code changes — or see how error tracking works and read about error tracking in the docs.

Before you call it fixed

  • A test order goes through as a logged-out shopper with every payment method.
  • The order request answers with clean JSON — no PHP lines before it.
  • No new entries in the fatal-errors log or the gateway's log.
  • Shoppers who saw the error have been checked for duplicate or orphaned payments.
FAQ

Questions about this guide

What does “There was an error processing your order” mean in WooCommerce?

It is the checkout's fallback message. WooCommerce shows it when the order request fails without a message of its own — the server answered with an error page, with something that isn't valid JSON, or not at all. The real cause is in the response to that request and in the server logs.

Was the customer charged even though they saw the error?

Sometimes, yes. The payment can go through and the error happen afterwards, while WooCommerce finishes the order. Before asking the shopper to try again, look for their order in WooCommerce → Orders and their payment in the gateway's dashboard, so nobody pays twice.

Why does the error only happen with one payment method?

Then the fault is almost always in that gateway's plugin or its connection: expired API keys, a request to the provider that times out, or a PHP error inside the plugin. Switch on the gateway's debug log and read its entry for a failed attempt under WooCommerce → Status → Logs.

Can caching cause “There was an error processing your order”?

It can. A cached checkout page carries an expired security token and a stale session, and a firewall or CDN rule can block or cut short the order request. Exclude the cart, checkout and my-account pages from caching, and check the firewall's log for the checkout address.

See the error behind the checkout message

Install the plugin, and the PHP and JavaScript errors shoppers hit on the checkout reach you with the visit they broke.

Start for free

Every feature on the Free plan, for 100 visitors a month. No card required.

Choose a plan

Plans from €29 a month, priced by your monthly visitors and the websites you connect.