Plugin Author
Diego
(@daigo75)
The error indicates that the validation could not be performed. This could have several causes: the VIES service could be unreachable, overloaded, or block the requests. In some cases, the server itself could be blocking the call to that service. The fact that the VIES page works is not necessarily relevant, as that page runs the check internally.
The following post explains this in more detail: https://wordpress.org/support/topic/faq-vat-is-not-deducted-when-entering-a-valid-vat-number/
Here you can also find the instructions to enable the debug mode and review the log, which should contain the details of errors encountered during the validation: https://wordpress.org/support/topic/faq-how-to-enable-and-view-the-vies-validation-log/. With that information, it should be easier to figure out why the VAT number could not be validated, and find out how to fix that issue.
Note: we would suggest to first enable the debug mode without entering your own VAT number in the settings. That will prevent any unexpected error from interfering with the save operation for the debug option.
Thanks for the reply, seems like option 2. Can’t understand why there would be a problem to reach the server from where I host the page. Any clues? Can it be a SSL certificate problem? I’m running it in a test envoirement now and haven’t a certificate before I go live.
[2020-11-19 21:12:14] wc-aelia-eu-vat-assistant.DEBUG: VAT number validation request. {“Request Arguments”:{“countryCode”:”SE”,”vatNumber”:”559144612401″}} {“process_id”:379466}
[2020-11-19 21:13:14] wc-aelia-eu-vat-assistant.DEBUG: VAT number validation complete. {“Country Code”:”SE”,”VAT Number”:”559144612401″,”VIES Response”:false} {“process_id”:379466}
[2020-11-19 21:13:14] wc-aelia-eu-vat-assistant.ERROR: EU VAT Number could not be validated due to errors in the communication with the remote service. {“Raw response”:{“valid”:null,”company_name”:null,”company_address”:null,”errors”:[],”raw_response”:null}} {“process_id”:379466}
Plugin Author
Diego
(@daigo75)
I’m afraid that we wouldn’t be able to say what the root cause could be. The fact that your site is running without an SSL certificate should be irrelevant, as that should not be required by the remote VIES service.
Perhaps there’s something blocking the communication with the remote server (the hosting provider could check that for you), or the VIES service is rejecting the request. It’s hard to say, without more information. If you have a developer who can assist you, perhaps they could troubleshooting this low level errors would by going into the code and review the communication at each. The 3rd SOAP library that handles requests and responses might be able to track some error code/number that could shed some light on the underlying issue.