• Resolved HungryJos

    (@hungryjos)


    I have a question regarding customers that already ordered and had VAT deducted but with a new order VAT is not deducted with same VAT number.

    If a VAT number is once registered as valid for deduction, can validation be skipped on the next order, so that VAT is automatically deducted, without verification?
    Now we get questions from clients that have a valid VAT number and had tax deducted from their order, but on a new order validation did not work (VIES unavailable) and they have to pay the tax to be able to continue with order.

    So can a VAT number be registered as valid, so that validation is not necessary and customer can order without VAT on next order?

Viewing 1 replies (of 1 total)
  • Plugin Author Diego

    (@daigo75)

    The EU VAT Assistant already caches the result of a successful VAT number validation, so it assumes that the number is valid for a set period of time. However, VAT numbers can become invalid from one day to the other, if a company de-registers, therefore it’s a good idea not to assume that they are valid for too long. This is the reason why the EU VAT Assistant re-validates them periodically.

    The default caching period for VAT number is one hour. If you want to extend it, you can use a filter for hook wc_aelia_euva_vat_validation_cache_duration and return a number of seconds for the cache duration (i.e. to cache the result for a day, you would return 86400, which is 24 hours x 60 minutes x 60 seconds).

    For more advanced customisations, you can use a filter for hook wc_aelia_eu_vat_assistant_customer_vat_exemption. In it, you could enable or disable the exemption using any custom criteria you like:

    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) {
      if(<SOME CUSTOM CONDITION, E.G. SPECIFIC USER ROLE>) {
        $customer_vat_exemption = true;
      }
    
      return $customer_vat_exemption;
    }, 10, 5);
    
Viewing 1 replies (of 1 total)
  • The topic ‘Previously registered VAT numbers’ is closed to new replies.