• Resolved slservice33

    (@slservice33)


    Hi, when todays woocommerce update is installed my site crashes and I get the fatal PHP error as below.

    Could it be my server PHP version – 8.1.26 ?

    I have a clone of the same site on a different server with lower PHP and it install OK.

    Any tips would be great, Stephen

    Error Details

    An error of type E_ERROR was caused in line 23 of the file /var/www/html/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php. Error message: Uncaught Error: Non-static method Automattic\WooCommerce\Internal\Features\FeaturesController::change_feature_enable() cannot be called statically in /var/www/html/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php:23
    Stack trace: 0 [internal function]: Automattic\WooCommerce\Internal\Admin\Marketplace->init() 1 /var/www/html/wordpress/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php(59): call_user_func_array() 2 /var/www/html/wordpress/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php(29): Automattic\WooCommerce\Internal\DependencyManagement\Definition->invokeInit() 3 /var/www/html/wordpress/wp-content/plugins/woocommerce/lib/packages/League/Container/Definition/Definition.php(212): Automattic\WooCommerce\Internal\DependencyManagement\Definition->resolveClass() 4 /var/www/html/wordpress/wp-content/plugins/woocommerce/lib/packages/League/Container/Definition/DefinitionAggregate.php(94): Automattic\WooCommerce\Vendor\League\Container\Definition\Definition->resolve() 5 /var/www/html/wordpress/wp-content/plugins/woocommerce/lib/packages/League/Container/Container.php(157): Automattic\WooCommerce\Vendor\League\Container\Definition\DefinitionAggregate->resolve() 6 /var/www/html/wordpress/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ExtendedContainer.php(158): Automattic\WooCommerce\Vendor\League\Container\Container->get() 7 /var/www/html/wordpress/wp-content/plugins/woocommerce/lib/packages/League/Container/Container.php(178): Automattic\WooCommerce\Internal\DependencyManagement\ExtendedContainer->get() 8 /var/www/html/wordpress/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ExtendedContainer.php(158): Automattic\WooCommerce\Vendor\League\Container\Container->get() 9 /var/www/html/wordpress/wp-content/plugins/woocommerce/src/Container.php(116): Automattic\WooCommerce\Internal\DependencyManagement\ExtendedContainer->get() 10 /var/www/html/wordpress/wp-content/plugins/woocommerce/includes/class-woocommerce.php(267): Automattic\WooCommerce\Container->get() 11 /var/www/html/wordpress/wp-content/plugins/woocommerce/includes/class-woocommerce.php(189): WooCommerce->init_hooks() 12 /var/www/html/wordpress/wp-content/plugins/woocommerce/includes/class-woocommerce.php(147): WooCommerce->__construct() 13 /var/www/html/wordpress/wp-content/plugins/woocommerce/woocommerce.php(53): WooCommerce::instance() 14 /var/www/html/wordpress/wp-content/plugins/woocommerce/woocommerce.php(68): WC() 15 /var/www/html/wordpress/wp-settings.php(473): include_once(‘…’) 16 /var/www/html/wordpress/wp-config.php(111): require_once(‘…’) 17 /var/www/html/wordpress/wp-load.php(50): require_once(‘…’) 18 /var/www/html/wordpress/wp-admin/admin.php(34): require_once(‘…’) 19 /var/www/html/wordpress/wp-admin/plugins.php(10): require_once(‘…’) 20 {main}

    thrown

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello! Go to /wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php:23

    find FeaturesController::change_feature_enable( ‘marketplace’, true ); and put // In front of it //FeaturesController::change_feature_enable( ‘marketplace’, true );

    Save and error fix

    Thread Starter slservice33

    (@slservice33)

    thanks I will try this later today and see what happens …

    Any ideas how the error would have got in there ? My sites been working fine for a year or two with no fatal PHP errors.

    Thread Starter slservice33

    (@slservice33)

    The woocommerce update which started the fatal error is now not available on my site so I cant try the fix.

    Hopefully the next update will go better ..

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @slservice33,

    Our developer is already aware of this known issue, which you can find here: https://github.com/woocommerce/woocommerce/issues/43406.

    Good news! They’ve prepared the fix, which will be released soon in the next update.

    In the meantime, as a workaround, please run this WP-CLI command to resolve this issue.

     wp --skip-plugins option update woocommerce_feature_marketplace_enabled yes

    You can also enable the Marketplace feature (WooCommerce -> Settings -> Advanced -> Features -> Marketplace) before upgrading to avoid this error.

    I hope this helps! Please let us know how it goes or if you need further assistance.

    Thread Starter slservice33

    (@slservice33)

    Thanks I’ll look into that.

    Had me a stressful couple of hours working out how to start my server in a way that the update would not immediately break it !

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Update causes fatal PHP error’ is closed to new replies.