WooCommerce: Reorder EU VAT field on checkout page
The EU VAT Number extension allows store owners to offer tax-free orders from EU businesses with a valid VAT number. By default, the EU VAT field is placed at the bottom of the billing fields. But what if you want to move that field to another potision?
The plugin adds the VAT number (optional) field below the billing fields as seen in 
As a store owner, you might want to reposition the VAT number (optional) field and place it below the company name as seen in
This can be achieved by adding the following code to your site, e.g. using using the Code Snippets plugin:
<?php
/**
* Reorder EU VAT field on checkout page
*
* @param $fields array The original array with the checkout fields
* @return $fields array The updated array with the checkout fields
* @see https://woocommerce.com/products/eu-vat-number/
*/
function smntcs_reorder_eu_vat_field( $fields ) {
$fields['billing']['billing_vat_number']['priority'] = 35;
return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'smntcs_reorder_eu_vat_field', 11 );To move the VAT number field to another position, simply adjust the priority of this field. As the company field has as priority of 30 and the country has a priority of 40, the VAT number field will be positioned between these two fields as its priority is set to 35.