The message indicates that the VIES service returned an unexpected response (the 307 redirect). Last time this happened, the cause was that the EU VAT Assistant fetched the WSDL document from an https://
endpoint, but the VIES service “silently” moved it to an https://
endpoint. Since a response code 307 (temporary redirect) was not expected, that returned an error. There’s a conversation, from a couple of weeks ago, about this topic: https://www.ads-software.com/support/topic/soap-client-wsdl-error-http-error/. This issue was solved in version 1.13.6.200415 of the EU VAT Assistant, which now always uses the https://
endpoint, avoiding the redirect altogether.
I don’t see any reason why the VIES service would have to move the WSDL back to an https://
endpoint, or redirect to that endpoint. It looks more like a glitch on their side, which, I reckon, will be fixed soon. In fact, we can’t reproduce it right now, we can’t see a respone of 307 anywhere.
Accepting VAT numbers without the VIES service
The WSDL document is a key element to communicate with the VIES service. The VIES service is the authority that indicates if a VAT number is valid or not. The EU VAT Assistant can’t validate a number without accessing that service, and won’t apply an exemption unless it receives a valid response from it.
The plugin offers some options to accept a VAT number as valid in some cases (e.g. server busy, service unavailable, etc). These options are located at WooCommerce > EU VAT Assistant > VAT Validation
. We haven’t designed them to handle the specific condition caused by the unexpected response from the VIES service, but you could try to see if enabling them allows the VAT numbers to be accepted when that happens.
If that is not sufficient, you can write your own custom code to apply an exemption when a VAT number could not be validated. Here’s a template, to get you started:
add_filter('wc_aelia_eu_vat_assistant_customer_vat_exemption', $customer_vat_exemption, $vat_country, $vat_number, $vat_number_validated, $raw_vat_validation_response) {
// If the number was not validated, follow your custom logic to decide if
// an exemption should be applied anyway.
//
// Variable $raw_vat_validation_response contains the raw response returned by the
// service. You can use its content to check how the validation operation went,
// and act accoredingly.
if(($vat_number_validated !== 'valid') && <your custom logic>) {
// $customer_vat_exemption should be be set to "true" to apply the VAT exemption
$customer_vat_exemption = true;
}
return $customer_vat_exemption;
}, 10, 5);
IMPORTANT
– The responsibility of applying the reverse charge rule correctly on intra-EU B2B transactions remains entirely on the merchant (i.e. you). If you choose to use the above code to apply an exemption a VAT number can’t be validated, you assume the risk of accepting invalid VAT numbers. Should that happen, it will be up to you to contact your local Revenue Authority and apply the necessary corrections.
– The aforementioned customisation is outside the scope of our support services (both free and premium). If you need assistance implementing it, you can hire a developer, or we can implement it for you as part of our consultation services.