PHP Critical Issues After updating WooCommerce 8.5

PHP Critical Issues After updating WooCommerce 8.5

Recently, WooCommerce has been released 8.5.0. Lots of features were added, updated and fixed. Due to these, also many functions are deprecated.

As a result, many sites has been crashed and you can see the critical PHP issues as below.

Whenever I update WooCommerce I get this error:
[19-Jan-2024 11:44:25 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Porto_Woo::load_packages() in /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php:27
Stack trace:
#0 /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php(30): Porto_Woo->__construct()
#1 /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-functionality.php(321): require_once(‘/home/hiconshop…’)
#2 /home/hiconshop/public_html/wp-includes/class-wp-hook.php(324): Porto_Functionality->load_woo(”)
#3 /home/hiconshop/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /home/hiconshop/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /home/hiconshop/public_html/wp-settings.php(506): do_action(‘plugins_loaded’)
#6 /home/hiconshop/public_html/wp-config.php(96): require_once(‘/home/hiconshop…’)
#7 /home/hiconshop/public_html/wp-load.php(50): require_once(‘/home/hiconshop…’)
#8 /home/hiconshop/public_html/wp-blog-header.php(13): require_once(‘/home/hiconshop…’)
#9 /home/hiconshop/public_html/index.php(17): require(‘/home/hiconshop…’)
#10 {main}
thrown in /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php on line 27
[19-Jan-2024 11:44:38 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Porto_Woo::load_packages() in /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php:27
Stack trace:
#0 /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php(30): Porto_Woo->__construct()
#1 /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-functionality.php(321): require_once(‘/home/hiconshop…’)
#2 /home/hiconshop/public_html/wp-includes/class-wp-hook.php(324): Porto_Functionality->load_woo(”)
#3 /home/hiconshop/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /home/hiconshop/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /home/hiconshop/public_html/wp-settings.php(506): do_action(‘plugins_loaded’)
#6 /home/hiconshop/public_html/wp-config.php(96): require_once(‘/home/hiconshop…’)
#7 /home/hiconshop/public_html/wp-load.php(50): require_once(‘/home/hiconshop…’)
#8 /home/hiconshop/public_html/wp-blog-header.php(13): require_once(‘/home/hiconshop…’)
#9 /home/hiconshop/public_html/index.php(17): require(‘/home/hiconshop…’)
#10 {main}
thrown in /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php on line 27
[19-Jan-2024 11:44:39 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Porto_Woo::load_packages() in /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php:27
Stack trace:
#0 /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php(30): Porto_Woo->__construct()
#1 /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-functionality.php(321): require_once(‘/home/hiconshop…’)
#2 /home/hiconshop/public_html/wp-includes/class-wp-hook.php(324): Porto_Functionality->load_woo(”)
#3 /home/hiconshop/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /home/hiconshop/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /home/hiconshop/public_html/wp-settings.php(506): do_action(‘plugins_loaded’)
#6 /home/hiconshop/public_html/wp-config.php(96): require_once(‘/home/hiconshop…’)
#7 /home/hiconshop/public_html/wp-load.php(50): require_once(‘/home/hiconshop…’)
#8 /home/hiconshop/public_html/wp-blog-header.php(13): require_once(‘/home/hiconshop…’)
#9 /home/hiconshop/public_html/index.php(17): require(‘/home/hiconshop…’)
#10 {main}
thrown in /home/hiconshop/public_html/wp-content/plugins/porto-functionality/porto-woo.php on line 27

Solution

Mothod 1:

Please update the theme and functionality plugin to the latest version (You need to update them manually by downloading from Themeforest).

Please try to update the theme and porto functionality plugin via FTP or Cpanel. https://www.portotheme.com/wordpress/porto/documentation/update-theme/

( PS: If you are still working on the out-dated WooCommerce version, you can update our theme and plugin on your site dashboard. )

Mothod 2:

If you have any troubles in updating the Porto theme due to some issues such as compatibility with the plugins, you can update the code manually.

Please follow below steps:

  1. Please open your site file manager like FTP or cPanel and open this file: public_html/wp-content/plugins/porto-functionality/porto-woo.php
  2. Please update the code like below image.
    Update Code

    Before:

    Previous Code

    After:

    Updated Code
  3. After updating code, please check your site how it is going. It will be working properly. 🙂

By porto_admin |