Woocommerce causing critical error on my website

Hello @studioczyz,

Thank you for reaching out to WooCommerce.com Support!

I understand you are seeing a critical error after the WooCommerce update to version 9.0.2. This is unusual as we have not heard of any similar report.

This kind of problem is usually caused by a conflict with your theme or with another plugin. The best way to determine this is to:

  • Temporarily switch your theme to Storefront or Twenty Twenty-Four
  • Disable all plugins except for WooCommerce
  • Repeat the action that is causing the problem

If you do not see the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or consider using a service like Jetpack. If something goes wrong, you will be able to restore it.

If you’ve tried all these steps and the problem persists, we would appreciate it if you could share a copy of the following:

  • System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
  • Fatal error logs (if any) under WooCommerce > Status > Logs.

You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here. 

Let us know how that goes.

Thanks! 

All of my plugins are off. I’ve changed my theme to Twenty Twenty-Four.

When I activate the WooCommerce plugin, I see an error at the top of the plugins page saying “Plugin could not be activated because it triggered a fatal error.”

I can’t run the WooCommerce status reports that you requested because, duh, WooCommerce won’t run.

My WordPress version is 6.5.5. PHP is 7.4.33. I can send the rest of my Site Health report if that helps.

In the meantime, how do I downgrade to an earlier WooCommerce version? My site was working fine up until WooCommerce updated to 9.0.2.

  • This reply was modified 1 hour, 57 minutes ago by studioczyz. Reason: additional info

I turned on debugging and tried to activate WooCommerce again. Looks like WooCommerce 9.0.2 is missing the file Autoloader.php.

[25-Jun-2024 11:28:18 UTC] PHP Warning: require(/home/customer/www/studio-celia.com/public_html/wp-content/plugins/woocommerce/src/Autoloader.php): failed to open stream: No such file or directory in /home/customer/www/studio-celia.com/public_html/wp-content/plugins/woocommerce/woocommerce.php on line 28
[25-Jun-2024 11:28:18 UTC] PHP Fatal error: require(): Failed opening required ‘/home/customer/www/studio-celia.com/public_html/wp-content/plugins/woocommerce/src/Autoloader.php’ (include_path=’.:/usr/local/php74/pear’) in /home/customer/www/studio-celia.com/public_html/wp-content/plugins/woocommerce/woocommerce.php on line 28

Thank you for reaching back, with further details on this @studioczyz .

 how do I downgrade to an earlier WooCommerce version?

Feel free to scroll to the advanced options section of this page, and select the version of WooCommerce you’d like to activate on your site. Once downloaded from there, upload and activate on your site via the plugins screen.

Below, I’d also like to attach a screenshot of a test site of mine, where things work as expected with WordPress version 6.5.5 and WooCommerce version 9.0.2, for reference.

Direct link to image: https://snipboard.io/fQL2HX.jpg

I hope this is helpful! We look forward to your response. In the meantime, please let us know if you have any further questions or concerns.

In comparing my staging site to my live site, I found that most of the folders were missing from the live site’s WooCommerce install.

The live site has these folders: includes, vendor.

The staging site has these folders: assets, client, i18n, includes, lib, packages, patterns, sample-data, src, templates, vendor.

The plugin update on the live site obviously failed, but was not caught and the corrupted plugin crashed my site.

The questions for your developers are 1) why didn’t all the folders get installed (or why were they erroneously removed) and 2) why didn’t the plugin do a self-verification and rollback when the update failed?

I’ve rolled back to 9.0.1 and all appears to be working again. Once the trauma resides, I will attempt 9.0.2 again.

Thank you for the help.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer