And, when this PHP module is not available on the server, the WooCommerce SOAP client missing error pops up.
Enabling SOAP module requires PHP reconfiguration and any bad step can mess up all websites.
Today, we’ll see how our Support Engineers enable WooCommerce SOAP client and make it work.
Why we need SOAP client ?
Let’s first check on the need of SOAP client in WooCommerce.
SOAP aka Simple Object Access Protocol is a messaging protocol that allows communications between processes running on different servers. In WooCommerce, some Web services use SOAP to get information from remote servers. For instance, when you have integrated FedEx shipping method, WooCommerce require SOAP to get live shipping quotes from FedEx.
Similarly, often WooCommerce users need website form data submitted to a SOAP web service. Some Woocommerce installations need SOAP client for PayPal integrations as well.
How does WooCommerce report SOAP error?
Fortunately, WooCommerce offers a quick way to check the status of the installation.
When the SOAP client is missing, the System Status of WooCommerce on the WordPress install will show up the following message:
SoapClient: Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
Steps to enable SOAP client on server
Let’s have a look on how we enable SOAP on the server.
On a plain CentOS server without control panel, we first install SOAP extension using:
yum install php-soap
Further, we edit the main PHP configuration file /etc/php.ini and enable the SOAP extension by uncommenting the line:
This again depends on the path of soap.so file.
Finally, we restart web server. When server has Apache, we restart it using:
service httpd restart
After installing and enabling SOAP client we further check and verify using the following commands.
[root@host ~]# php -v PHP 7.2.21 (cli) (built: Aug 6 2019 04:24:31) ( NTS ) Copyright (c) 1997-2018 The PHP Group
[root@host ~]# php -m | grep soap soap
Again, Bobcares Engineers always confirm that the domain’s PHPinfo page shows the SOAP extension details.
In cPanel/WHM servers, PHP SOAP extension can be enabled easily by recompiling PHP using EasyApache too.
Common Errors while enabling SOAP client
At times, even after enabling WooCommerce SOAP client,things may not work correctly. We’ll now see how our Dedicated Engineers fix them.
1. Applying SOAP extension on wrong PHP
Enabling SOAP extension on servers with multiple PHP versions often end up in errors.
Recently, a customer reported problem with his WooCommerce installation. He installed SOAP client on his server. Afterwards, when he refreshed the System Status page, the message was the same.
Here, our Dedicated Engineers checked the PHP info page of the domain and SOAP extension was missing. We found that the server had multiple PHP versions and customer enabled SOAP only for one version of PHP.
To fix the error, we had to enable SOAP for the specific version of PHP that the website was using.
2. Missing Web server restart
Similarly, missing webserver restart is yet another common reason for SOAP client missing error.
For the PHP configuration changes to be effective, the web server needs a restart. Therefore after enabling SOAP, we always make sure to restart the webserver. For Apache servers, we use
systemctl restart apache2
And for Nginx servers, it will be
service nginx restart
Again, when the server has php-fpm, we make sure to restart it as well.
[Looking for fixing WooCommerce errors? Our Expert Engineers are available 24×7.]
To summarize, WooCommerce SOAP client helps in communication with remote servers. In this write-up, we saw how our Dedicated Engineers setup SOAP extension on the server and fix related errors.
The post WooCommerce SOAP client – How to quickly enable it appeared first on Bobcares.