Skip to content
WooRescueHQ

WooCommerce / Errors

WooCommerce errors: PHP, JavaScript, database and conflicts

An error message is the most useful clue a broken store gives you — if you find the real one. The message customers see is usually generic; the precise error, with file and line, is in a log.

Short answer

Find the exact error first. PHP errors are in WooCommerce → Status → Logs (fatal-errors), the PHP error log or wp-content/debug.log. JavaScript errors are in the browser console. Read the file path in the error: it tells you whether the cause is a plugin, the theme, custom code or WooCommerce itself, and the timestamp tells you which change triggered it.

Specific problems

Error types

PHP

PHP fatal error

“There has been a critical error on this website” and white screens.

/woocommerce/errors/php-fatal-error/
JavaScript

JavaScript errors

Broken buttons, checkout that does nothing, cart that does not update.

AJAX

AJAX errors

admin-ajax.php or ?wc-ajax= requests failing with 400, 403 or 500.

Plugins

Plugin conflicts

Two extensions, or an extension and custom code, competing for the same flow.

/woocommerce/errors/plugin-conflict/
Theme

Theme conflicts

Outdated template overrides, removed hooks, theme JavaScript.

Database

Database errors

Connection errors, missing tables, deadlocks, failed queries.

API

REST API errors

401, 403 and 500 responses from /wp-json/wc/ endpoints.

/woocommerce/integrations/rest-api/

Read the error properly

A PHP fatal error contains everything needed to start: the error type, the message, the file and line, and usually a stack trace. The file path tells you where — wp-content/plugins/<plugin>/…, the theme, a mu-plugin or WooCommerce. The stack trace tells you how it got there — often a WooCommerce hook calling custom code. The timestamp tells you when, which you can match to an update, a PHP version change or a deployment.

Log
PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string + float
  in /wp-content/plugins/custom-fees/custom-fees.php:142
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): add_custom_fee(Object(WC_Cart))
#1 /wp-includes/plugin.php(205): WP_Hook->apply_filters(...)

In this example, the code at line 142 of a custom plugin receives a string where it expects a number, during the cart fee calculation. That points to a recent change in what is passed to that function — not to WooCommerce itself.

Where each kind of error is logged

Error Where to find it
PHP fatal errors WooCommerce → Status → Logs (fatal-errors), PHP error log
PHP warnings and notices wp-content/debug.log with WP_DEBUG_LOG enabled
JavaScript errors Browser console
AJAX and REST API errors Browser Network panel: status code and response body
Database errors PHP error log, debug.log, MySQL error log on the server

Frequently asked questions

Where are WooCommerce error logs?

Under WooCommerce → Status → Logs. Fatal errors are logged with the source fatal-errors. PHP errors also go to the server's PHP error log, and to wp-content/debug.log when WordPress debug logging is enabled.

Is it safe to enable WP_DEBUG on a live store?

Enable logging, not display: set WP_DEBUG and WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false, so errors are written to the log and never shown to customers. Turn it off when you are done, and keep the log out of public reach.

How do I know which plugin causes a conflict?

Start from the error's file path and the timing of recent changes. If there is no error, reproduce the problem on a staging copy and isolate it by disabling plugins in halves there — never on production during trading hours.

$ describe the problem

Have a WooCommerce problem?Request a diagnosis.

Tell us what is failing, what changed recently and the business impact. We review every request and recommend the appropriate next step.

Request a diagnosis See services and prices

Never send passwords, API keys or card data through the form.

Diagnosis from€299

Request a diagnosis