⚠️ We have released WooCommerce 9.0.1 to address this issue. Please upgrade if you are experiencing this error.
The Details
An issue in WooCommerce 9.0 was reported to us through the WooCommerce and WooCommerce Legacy REST API support forums. The issue appears to be the result between code associated to the recent deprecation of the Legacy REST API, server configurations, and caching mechanisms.
The primary symptom of this problem is a fatal error message stating Fatal error: Uncaught Error: Class 'WC_Legacy_API' not found...
This error has been observed predominantly among users employing LiteSpeed Cache Plugin, although it may also impact others.
How Can I Tell If This Affects Me?
If you have upgraded to WooCommerce 9.0, and you encountered an error similar to the following: Fatal error: Uncaught Error: Class ‘WC_Legacy_API’ not found…, you are affected.
Error Message: Look for the specific fatal error message mentioned above in your WordPress error logs or directly on your website if errors are displayed to visitors.
Immediate Actions We Are Taking
We have implemented a temporary fix that prevents the fatal error from occurring (#48593). However, this does not address the root cause of why deleted files continue to appear on servers.
We are actively investigating the root cause in order to implement a permanent resolution to this issue. We will announce updates in this blog and across our social channels.
What Action Should I Take?
We suspect this issue is related with deleted files continuing to appear in the server as a result of a corrupted installation process.
- For many users, manually removing the WooCommerce 9.0 plugin, and re-uploading the WooCommerce 9.0 plugin directory from the WooCommerce WordPress Plugin Page fixed the issue.
- Users have also reported fixing the issue by installing WooCommerce 9.0 via wp-cli.
wp plugin deactivate woocommerce
wp plugin install woocommerce --version=9.0.0 --force
wp plugin activate woocommerce
wp plugin status woocommerce
If the fixes above do not stop the Fatal error: Uncaught Error: Class 'WC_Legacy_API' not found...
error from appearing, please revert to WooCommerce 8.9.3.
Still having issues? Please reach out to us in the comments section.
Leave a Reply