Fatal error after Woocommerce 8.5 upgrade
Error info: Plugin could not be activated because it triggered a fatal error.
Fatal error: Uncaught Error: Non-static method Automattic\WooCommerce\Internal\Features\FeaturesController::change_feature_enable() cannot be called statically in /wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php:23
PHP Fatal error: Uncaught Error: Non-static method Automattic\WooCommerce\Internal\Features\FeaturesController::change_feature_enable() cannot be called statically in /wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php:23
Fatal error: Uncaught Error: Non-static method Automattic\WooCommerce\Internal\Features\FeaturesController::change_feature_enable() cannot be called statically in /wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php:23
PHP Fatal error: Uncaught Error: Non-static method Automattic\WooCommerce\Internal\Features\FeaturesController::change_feature_enable() cannot be called statically in wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php:23
Fatal error: Uncaught Error: Non-static method Automattic\WooCommerce\Internal\Features\FeaturesController::change_feature_enable() cannot be called statically in /wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php:23
Sort it out:
解决办法:
1、Rename plugin that cause error and check
mv wooCommerce WooCommerce_old
2、Downgrade to old version of the plugin at 8.4 and SFTP to replace it on the server
download woocommerce 8.4 from : Woocommerce Github
3、Enable Marketplace via WP-CLI command
wp --skip-plugins option update woocommerce_feature_marketplace_enabled yes
Reason why error occurred:
Remember:
1、turn off the auto-upgrade function of the WordPress plugins
2、back up your server data
Two products launched right now:
AI Agent: https://orbitmoonalpha.com/shop/ai-tool-agent/
AI Drawsth: https://orbitmoonalpha.com/shop/ai-tool-drawsth/