• Resolved admiraltuuvok

    (@admiraltuuvok)


    Hello guys, I need to enable VAT as a required field on my website, but also the UK doesn’t need to use their VAT code, so is there a way to remove the UK from the requirement?

    Thanks!

    • This topic was modified 3 years, 8 months ago by admiraltuuvok.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Diego

    (@daigo75)

    As far as we have been told, the VAT MOSS regime still includes the UK, which is why that country still count as “EU” for that purpose.

    If you wish to exclude the UK from EU countries, you could try with a filter like the following:

    
    /**
     * Exclude UK and Isle of Man from the list of EU countries used by the EU VAT Assistant.
     * 
     * DISCLAIMER
     * Because this code program is free of charge, there is no warranty for it, to the extent permitted by applicable law.
     * Except when otherwise stated in writing the copyright holders and/or other parties provide the program "as is"
     * without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of
     * merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program
     * is with you. should the program prove defective, you assume the cost of all necessary servicing, repair or correction.
     */
    add_filter('wc_aelia_eu_vat_assistant_eu_vat_countries', function($countries) {
      $countries = wc()->countries->get_european_union_countries();
      // Add Monaco, which is treated as France by EU VAT rules 
      $countries[] = 'MC';
      return $countries;
    });
    

    If you use this code in WooCommerce 4.0 and later, the list will of EU countries will exclude UK and Isle of Man. You can then set the VAT number field as “required for EU countries” and it will be required for all EU countries, again except UK and Isle of Man.

    Thread Starter admiraltuuvok

    (@admiraltuuvok)

    Thank you I will give this a go!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How the UK been removed from required yet?’ is closed to new replies.