How can I change the position of the VAT number box on the WooCommerce checkout page?

You can do this using the wc_eu_vat_number_position and wc_eu_vat_number_priority filters. You should set the first filter value to be any position which your WooCommerce template supports, using WordPress’s standard filtering mechanism. The second is a priority, for when there are multiple items using the same position. In this context, a “position” means an WordPress action which your template calls.

The default position is woocommerce_checkout_billing (this corresponds to the WordPress action of that name; it is the default because all templates will somewhere call that action) and the default priority is 40. Here is an example of changing the position to woocommerce_checkout_after_customer_details:

add_filter('wc_eu_vat_number_position', function () { return 'woocommerce_checkout_after_customer_details'; });

To know what positions (actions) exist in your template, you need to either read its code (if you know how to do that), or to speak to a competent developer, or the theme author. Unfortunately it is not easy to automatically get such a list, and beyond the scope of the VAT plugin.

Note that not every template position is a technical possibility – you need to keep it within the main body of address selection. This is because of assumptions (which may not stay the same over time) that WooCommerce makes about the internal structure of the checkout page.

Concerning customisation of the above code, if you do not have your own PHP developer working on the project: this FAQ may also be relevant: Can you write some code for me, to customise the plugin?

Posted in: WooCommerce EU/UK VAT Compliance