Skip to content

Instantly share code, notes, and snippets.

@nielslange
Created September 17, 2020 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nielslange/3b91ca5e9906a0cb77549c6fffe58427 to your computer and use it in GitHub Desktop.
Save nielslange/3b91ca5e9906a0cb77549c6fffe58427 to your computer and use it in GitHub Desktop.
Reorder EU VAT field on checkout page
<?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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment