Support » Plugin: WooCommerce EU VAT Assistant » Bypass IP_BLOCKED by VIES

  • Resolved Konijntje

    (@konijntje)


    Hi all,

    How can I (temporarily) enable “Accept VAT numbers as valid when the remote service has blocked my IP” ?

    VIES has wrongfully blocked my webshop’s IP address. I have just sent VIES (TAXUD-VIESWEB@ec.europa.eu) an e-mail for asking to unblock my IP, because I’m not an abuser.

    But in the meanwhile my EU-customers unfortunately cannot validate their VAT number. So the system still wrongly calculate the VAT.

    Maybe there is a method to bypass this temporarily by using a code snippet in functions.php ?

    Please help me out.
    Thanks in advance!

    • This topic was modified 1 year, 2 months ago by Konijntje.
    • This topic was modified 1 year, 2 months ago by Konijntje.
    • This topic was modified 1 year, 2 months ago by Konijntje.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Diego

    (@daigo75)

    The EU VAT Assistant doesn’t include an option to apply a VAT exemption when the VIES service blocks an IP address. You can try to do that by writing a filter for hook wc_aelia_eu_vat_assistant_customer_vat_exemption. Here’s a template for it:

    add_filter('wc_aelia_eu_vat_assistant_customer_vat_exemption', function($customer_vat_exemption, $vat_country, $vat_number, $vat_number_validated, $raw_vat_validation_response) {
      // Argument $raw_vat_validation_response contains the response returned by the
      // VIES service
      if(<YOUR CUSTOM LOGIC>) {
        $customer_vat_exemption = true;
      }
    
      return $customer_vat_exemption;
    }, 10, 5);

    Important notes
    – Please be aware that, if the VIES service rejects the call altogether, the $raw_vat_validation_response argument could be empty, or null. The EU VAT Assistant doesn’t perform a low-level check on HTTP communication, therefore you might have to rely on the fact that a null response could mean “service could not be reached” and act accordingly.
    – While accepting potentially invalid VAT number can help customers to complete orders when the validation service is not working, it also exposes you to the possibility of granting a VAT exemption to customers who are not entitled to it. The responsibility of applying a VAT exemption only when needed, providing evidence in relation to such exemption to the Revenue Office, and rectify exemptions granted when not due, remains responsibility of the merchant.

    Thread Starter Konijntje

    (@konijntje)

    Hi Diego,

    Thanks for your answer.

    Strangely suddenly I can perform a VAT check now on VIES-servers, which mean that VIES has unblocked my IP.

    That’s weird… is it possible that VIES automatically unblocks IP after a period?
    Why did VIES blocked my IP at the first place?

    Plugin Author Diego

    (@daigo75)

    It’s indeed possible that the VIES system uses an automated system to block and unblock IP addresses. Unfortunately, we wouldn’t be able to say why an IP address could be blocked, as that’s depends on how the configuration of the VIES system. From our side, we can say that the EU VAT Assistant doesn’t perform unnecessary requests and that it follows the guidelines for the VIES integration. We can exclude a “spam requests” issue from the possible causes.

    If you need more information about the blocking of the IP address, the support team for the VIES service should be able to provide some more details about it.

    Thread Starter Konijntje

    (@konijntje)

    Diego,

    Thanks for your fast reply and your information!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bypass IP_BLOCKED by VIES’ is closed to new replies.