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.
Technical resources
Error guides
- WooCommerce / Errors WooCommerce Fatal Error: A Practical Troubleshooting Guide Read the fatal error properly — file, line, stack trace — and connect it to the change that triggered it.
- WooCommerce / Errors WooCommerce Plugin Conflict: How to Find the Cause Start from the evidence — the error, the timing, the request — and isolate on staging by halves, not one plugin at a time on production.
Specific problems
Error types
PHP fatal error
“There has been a critical error on this website” and white screens.
JavaScript errors
Broken buttons, checkout that does nothing, cart that does not update.
AJAX errors
admin-ajax.php or ?wc-ajax= requests failing with 400, 403 or 500.
Plugin conflicts
Two extensions, or an extension and custom code, competing for the same flow.
Theme conflicts
Outdated template overrides, removed hooks, theme JavaScript.
Database errors
Connection errors, missing tables, deadlocks, failed queries.
REST API errors
401, 403 and 500 responses from /wp-json/wc/ endpoints.
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.
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.
Never send passwords, API keys or card data through the form.