DEV Community

Zaw Htut Win
Zaw Htut Win

Posted on • Updated on

Call to undefined function GuzzleHttp\Psr7\uri_for() - GuzzleHttp Conflict in Wordpress

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
Enter fullscreen mode Exit fullscreen mode

Then you will see the results similar to this.

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode

In /home/gsc/gscwoo/wp-content/plugins/woocommerce-xero/vendor/guzzlehttp/guzzle/src/Client.php

Enter fullscreen mode Exit fullscreen mode

Happy Coding!

Top comments (0)

An Animated Guide to Node.js Event Loop

>> Check out this classic DEV post <<