• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WP Desk = premium plugins for WordPress & WooCommerce
  • Plugins
        • Checkout & OrdersMake your work easier and automate the orders. Adjust the order form to your needs and make it more useful to your customers. Print order labels directly from WooCommerce. Put the orders in order using our plugins. Find out how to streamline the procurement process in your store.
          • Flexible Checkout Fields
          • Active Payments
          • Automatic Payment Status
          • Flexible Refund and Return Order
          • Print Orders and Address Labels
          • Flexible Subscriptions Recurring Shipping
          • Flexible Subscriptions Payment Retry
          • Flexible Subscriptions Stock Management
        • ProductsThese plugins will help you manage your WooCommerce products. Here you will find the plugins to import and update products from XML or CSV files. Then you can change the product unit of measure, show the lowest price in the last 30 days (Omnibus Directive), or let customers name the product price!
          • Flexible Product Fields
          • Dropshipping Import Products
          • Dropshipping FTP Import Products
          • Dropshipping Export Products
          • Custom Price
          • WP Desk Omnibus
          • Flexible Quantity Calculator
          • Dropshipping Orders Export
        • MarketingPromote your store online. Add products from your shop to price comparison websites directly from WooCommerce. Acquire new customers and communicate with your existing ones. Build a customer base and communicate with clients using one of the most effective marketing tools, namely e-mail marketing. Check out our promotional tools!
          • Flexible Pricing
          • Flexible Wishlist - Analytics & Emails
          • OLX WooCommerce
          • Flexible PDF Coupons
          • ShopMagic
          • Flexible Invoices
  • Bundle🔥
  • WP Desk Care
  • Support
  • Blog
  • My Account
  • 0

More results

EU VAT number validation in WooCommerce

Plugin Tutorials, Tech Posts, WooCommerce checkout fields

WP Desk3 minutes read2025-08-20
blog category heading image

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.

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.

Contents

  • Show the EU VAT number field in the WooCommerce checkout form
    •  Get the Flexible Checkout Fields plugin for WooCommerce
    • Flexible Checkout Fields WooCommerce
    • Add the EU VAT number field to the Checkout
  • Add EU VAT number validation in WooCommerce
    • Add custom code to functions.php
    • Add EU VAT number validation
    • EU VAT number validation in the WooCommerce checkout form - Final effect
  • Summary & Different ways to add EU VAT number validation in WooCommerce
    • Related Articles
  • Add the EU VAT number field for the WooCommerce checkout
  • Customize the WooCommerce Checkout Page: Top Tips for a Seamless Experience
  • How to Configure Validation for WooCommerce Checkout Fields Verification (like Email)
  • WooCommerce Checkout Validation for fields (email address example)
  • How to add the confirm email address field on the WooCommerce checkout page and verify it?

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: 2026-08-19
    Works with WooCommerce 10.7 - 11.1

    💡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.

Related Articles

Add EU VAT number in WooCommerce checkout

Add the EU VAT number field for the WooCommerce checkout

Adding the EU VAT number field in WooCommerce sounds like an easy thing, but many store owners face some problems with it. In this article, I’ll show ...
WooCommerce add custom field to the checkout page with a plugin and the woocommerce_checkout_fields filter

Customize the WooCommerce Checkout Page: Top Tips for a Seamless Experience

I don’t have to convince you that the checkout page is one of the most important parts of every WooCommerce store. The possibility to fully adjust it ...
WooCommerce email validation plugin

How to Configure Validation for WooCommerce Checkout Fields Verification (like Email)

In this article, I'll show you how to configure automatic WooCommerce checkout email verification. You will be able to use the default WooCommerce che...
WooCommerce address validation

WooCommerce Checkout Validation for fields (email address example)

In this article, I'll show you (probably) the best way to add the validation for the WooCommerce checkout form (for the e-mail address field) with a f...
Confirm email address in WooCommerce checkout

How to add the confirm email address field on the WooCommerce checkout page and verify it?

In some situations default WooCommerce email validation is not good enough. Do your clients often enter the wrong email address on the checkout page? ...

3 minutes read19967 views

Reader Interactions

Comments

  1. David Sandel says

    2022-08-26 at 18:23

    This code works great when the customer adds a VAT number. Thank you for the snippet!
    However, I set my FCF field as optional because I sell B2B and B2C from the same page. So when a B2C customer tries to check out, it still gives me an error that the VAT number is wrong, even though it’s completely empty. Which basically makes this a "required" field.
    How can I update the snippet to ignore empty FCF fields? Thank you!

    Reply
    • David Sandel says

      2022-08-26 at 18:53

      Never mind, I figured it out. At the beginning of the is_eu_vat_number_valid( $id, $customer_country ) function, I just put a check to see if $id is empty.
      if ( empty($id) ) return true;

      Reply
  2. David Sandel says

    2023-01-15 at 11:40

    Never mind, I figured it out. At the beginning of the is_eu_vat_number_valid( $id, $customer_country ) function, I just put a check to see if $id is empty. if ( empty($id) ) return true;

    Reply
  3. David Sandel says

    2023-01-15 at 11:40

    This code works great when the customer adds a VAT number. Thank you for the snippet! However, I set my FCF field as optional because I sell B2B and B2C from the same page. So when a B2C customer tries to check out, it still gives me an error that the VAT number is wrong, even though it’s completely empty. Which basically makes this a “required” field. How can I update the snippet to ignore empty FCF fields? Thank you!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

WP Desk

...

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 →
WP Desk › Blog › WooCommerce checkout & orders › WooCommerce checkout fields › EU VAT number validation in WooCommerce

Primary Sidebar

Contents

  • Show the EU VAT number field in the WooCommerce checkout form
    •  Get the Flexible Checkout Fields plugin for WooCommerce
    • Flexible Checkout Fields WooCommerce
    • Add the EU VAT number field to the Checkout
  • Add EU VAT number validation in WooCommerce
    • Add custom code to functions.php
    • Add EU VAT number validation
    • EU VAT number validation in the WooCommerce checkout form – Final effect
  • Summary & Different ways to add EU VAT number validation in WooCommerce

Flexible Checkout Fields PRO WooCommerce £59

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

Add to cart or View Details
WP Desk
80,000+ Active Installations
Last Updated: 2026-08-20
Works with WooCommerce 10.7 - 11.1

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.

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

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
  • Get Support
  • Contact us

Products

  • Premium Plugins
  • WP Desk Care
  • Documentation
  • WooCommerce Invoices
  • Email Marketing
  • PDF Coupons

Legal

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

© 2026 WP Desk

We value your privacy

We use necessary cookies to make our site work. We'd also like to set additional cookies to understand site usage, enhance your browsing experience, and serve personalized ads or content. By clicking ‘Accept All,’ you consent to our use of additional cookies.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}