WooCommerce
				WooCommerce validate VAT in Checkout
		Validate all VAT numbers entered by clients on your website with a valid format to ensure client data is correct.

WooCommerce

WooCommerce validate VAT in Checkout

Validate all VAT numbers entered by clients on your website with a valid format to ensure client data is correct.

With WooCommerce VAT number validation customers VAT numbers are validated in checkout to ensure they are typed in correctly.

Also works with international VAT numbers as all VAT numbers are checked for existence in VIES database.

Validation of phone numbers in WooCommerce

You set it up under “Appearance > Customize > WooCommerce > Validation of VAT number”. Here you are also able to set selectors for additional input fields which contains VAT numbers and select if you would like the plugin to also add the VAT number checkout field.

Installation / Setup

To get started you just need to purchase the plugin and enter the license which you received upon purchase. After activating the plugin go to “Appearance > Customize > WooCommerce > Validation of VAT number” to set the license and set the desired settings.

Requirements

  • WordPress Version 4.9.x or newer
  • WooCommerce Version 3.2.x or newer

 

WooCommerce VAT number validation in checkout (roadmap)

We had to start somewhere! What do you think we should develop next? – Write to us at support@rommel.dk if you have any ideas or features you’d like to see in this plugin.

Customize the plugin via PHP filters

Use this code if you need to validate VAT number fields on other pages than the checkout in WooCommerce. Note that ajax loaded fields are not supported.

add_filter('r_wc_validate_vat_number_enable', function() {
return true;
});

Additional fields which should be validated (could be dynamic fields)

It’s possible to add a list of fields to validate by a PHP filter which could help you validate fields added dynamically. You will need to use a filter and add custom selectors which are either classes or ids on the input field that should be validated.

add_filter('r_wc_validate_vat_number_inputSelectors', function( $selectors ) {
return array_merge($selectors, [
'.this-class-should-be-validated',
'#thisIdShouldBeValidated'
]);});

= 1.0.0 (10/06-21) =
* Added plugin.

= 1.1.0 (27/08-21) =
* Feature: Update custom field validation.

= 1.1.1 (09/09-21) =
* Fix: error where an invalid VAT number wasn’t properly validated on checkout submit.
* Fix: error in WC order overview page not showing customer information.

= 1.1.2 (10/09-21) =
* Feature: Add option to make added checkout field required.

Contact

  • This field is for validation purposes and should be left unchanged.