• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Essential Premium WooCommerce Plugins - WP Desk
  • Plugins
  • Bundle
  • Support
  • Blog
  • My Account
  • 0

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

Bartosz Gajewski

EU VAT number validation in WooCommerce

Updated: January 02, 2023 / Plugin Tutorials

Adding an EU VAT number field on the checkout page can be an important thing to do in the WooCommerce store, especially when you sell to business owners. In this article, I’ll show you how to display that field and how to add EU VAT number validation in the WooCommerce checkout!

Have you ever checked if the buyer's VAT EU number is correct? It's quite annoying to check it manually, isn't it?

Wouldn't be great to add the EU VAT number field with the validation at the same time directly in the WooCommerce checkout form? Of course, it would save you time and help speed up processing orders. Read more to learn a method to do that!

💡Are you looking for an invoicing solution as well? Check out the Flexible Invoices for WooCommerce plugin which adds the EU VAT number field and has automatic validation of VAT EU numbers in the European VIES database.

Table of contents

  1. Show the EU VAT number field in the WooCommerce checkout form
  2. Add EU VAT number validation & example
  3. Summary & Different ways to add EU VAT number validation in WooCommerce

If you are selling in the European Union, probably you know there are certain legal aspects you must follow. One of the most important things is to support the VAT identification number (known as VAT Number or EU VAT). Without it, you can’t issue a valid invoice.

Show the EU VAT number field in the WooCommerce checkout form

WooCommerce doesn’t add or cover EU VAT validation. So you have to use a plugin to handle that. Follow the steps below to add the field with the validation.

  1.  Get the Flexible Checkout Fields plugin for WooCommerce

    👉🏼 In my case, I’ll use the free version of Flexible Checkout Fields. It’s an easy way to add new fields to the order form in WooCommerce. Flexible Checkout Fields is a very-well-rated plugin with over 80,000 stores using it daily.

    Flexible Checkout Fields WooCommerce

    Validate WooCommerce EU VAT Number in a few seconds. Easy to set up, fast and flexible!

    Download for free or Go to WordPress.org
    WP Desk
    80,000+ Active Installations
    Last Updated: 2023-03-13
    Works with WooCommerce 7.1 - 7.5.x

    💡Also, check out our invoicing plugin for WooCommerce with the built-in EU VAT number validation.
  2. Add the EU VAT number field to the Checkout

    👉🏼 First, we have to add a field to validate it. After you install and activate the Flexible Checkout Fields plugin, go to WooCommerce → Checkout Fields, and in the Add New Field section choose Text. Next, enter the field label and click on the Add Field button.

    validate eu vat
    Add a Text field, which will validate EU VAT Number in the checkout

    👀 Watch the short video tutorial from the user showcase:

 

Add EU VAT number validation in WooCommerce

When you have your EU VAT field, it's time to add proper validation. That means that WooCommerce will check if the customer's EU VAT number is valid based on EU regulations. In this case, I have to make my validation, because Flexible Checkout Fields has only email, phone number, and postal code validation built into its core.

  1. Add custom code to functions.php

    To add new validation to WooCommerce you have to add the code that is displayed below to your functions.php file. Please remember to add the code again if you change or update your WordPress theme!

    💡This article might help you if you are not sure how to do it: Validate WooCommerce Checkout Fields

  2. Add EU VAT number validation

    When you have your functions.php file updated, you can add a validation. Again, go to WooCommerce → Checkout Fields, and see the field added before. In the General tab you can choose whether the field should be required or not.

    Now go to the Advanced tab. In the Validation section, you should see your new custom validation.

    vat number validation checkbox
    This is youc custom VAT number validation

    Choose your validation and click on Save Changes. Let’s try it out.

  3. EU VAT number validation in the WooCommerce checkout form - Final effect

    If I’ll enter not a valid EU VAT number field on the checkout page, I should see a proper error notice.

    invalid VAT number notice in the WooCommerce checkout form
    EU VAT Number Validation failed

    If the EU VAT number is correct, the order will be placed without any problems.

Summary & Different ways to add EU VAT number validation in WooCommerce

As you can see, the way I presented is for more advanced customers. But there is another solution!

You could also use the Flexible Invoices plugin, which has the built-in EU VAT number validation in the European VIES database directly & live at the checkout!

Check out our article, where you can find more information about 3 easy ways to add a VAT number field in WooCommerce.

Thanks to the premium Flexible Invoices WooCommerce plugin's functionalities you may use VIES validation of VAT EU numbers when selling digital products.

Read more about how to invoice in the European Union using WooCommerce to see how the plugin in action.

How to validate Checkout Fields and add EU VAT to checkout

  • Read our docs to find out more

    validation rules
    Create your own custom validation rules. Find out how to create your own validation rules with Flexible Checkout Fields.

  • Add the EU VAT number in checkout

    add vat eu to woocommerce checkout
    How to add EU VAT field to checkout. The easiest way to add the EU VAT number field with a plugin.

Tweet

3 minutes read6882 views

Bartosz Gajewski

Content Specialist in WP Desk. He tries to increase the number of plugin users with useful content. Privately an enthusiast of mountains and European cinema.

Powered by WP Desk

WP Desk brings you great WooCommerce plugins. We strive to save your time and money by speeding up your processes. Use our plugins to build a better store. Awesome support included in the package.

Premium WooCommerce Plugins →

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

WP Desk › Plugin Tutorials › EU VAT number validation in WooCommerce

Footer

WP Desk - WooCommerce Plugins

At WP Desk we create great WooCommerce plugins with awesome support. Save time and money with our e-commerce solutions. See how we can help you improve your e-store →

Secured by Comodo

WP Desk

  • About us
  • Giving Back
  • Blog
  • Contact us

Products

  • Premium Plugins
  • Get Support
  • WooCommerce Invoices
  • Email Marketing
  • Octolize

Legal

  • Terms & Conditions
  • Refund Policy
  • Support Policy
  • Privacy Policy

© 2023 WP Desk