Created
July 8, 2019 09:14
-
-
Save webdados/2b453842df0709e682e9e53abe04e125 to your computer and use it in GitHub Desktop.
Manipulate VAT field position on Invoicing with InoiceXpress for WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_checkout_fields', 'my_woocommerce_checkout_fields', 60 ); | |
function my_woocommerce_checkout_fields( $fields ) { | |
if ( isset( $fields['billing']['billing_VAT_code'] ) ) { | |
$fields['billing']['billing_VAT_code']['class'] = array( 'form-row-first' ); //Or form-row-last | |
$fields['billing']['billing_VAT_code']['clear'] = true; //Or false if we use form-row-last | |
$fields['billing']['billing_VAT_code']['priority'] = 120; //120 is the default position, change this to move it up or down on the form | |
} | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment