This error occurred when there is plugins conflict. This is cause by guzzlehttp.
First find out how many plugins are there using. guzzlehttp.
In my case there are two, first one using guzzlehttp 7.0 and the latter using 6.4.1
Go to plugin directory and execute this command.
sudo find . -name "guzzlehttp" -type d
Then you will see the results similar to this.
./woocommerce-xero/vendor/guzzlehttp
./wp-mail-smtp/vendor/guzzlehttp
When this plugin is in conflict state, plugins effected can no longer detect the functions.php files in the vendor folder. So we need to make some adjustments to plugins:
In /home/gsc/gscwoo/wp-content/plugins/wp-mail-smtp/vendor/autoload.php
require_once(__DIR__.'/guzzlehttp/psr7/src/functions.php');
require_once(__DIR__.'/guzzlehttp/guzzle/src/functions.php');
require_once(__DIR__.'/guzzlehttp/promises/src/functions.php');
In /home/gsc/gscwoo/wp-content/plugins/woocommerce-xero/vendor/guzzlehttp/guzzle/src/Client.php
require_once(ABSPATH.'/wp-content/plugins/woocommerce-xero/vendor/guzzlehttp/psr7/src/functions.php');
Happy Coding!
Top comments (0)