Last active
November 23, 2020 18:02
-
-
Save webdados/1c2e6063e84fb1981af0dde358128fd3 to your computer and use it in GitHub Desktop.
Customize the "Invoicing with InvoiceXpress for WooCommerce" VAT field
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 | |
//We hook woocommerce_checkout_fields at 50, so this needs to be at least 51 | |
add_filter( 'woocommerce_checkout_fields', 'ix_vat_woocommerce_checkout_fields', 51 ); | |
function ix_vat_woocommerce_checkout_fields( $fields ) { | |
//Change label - originally __( 'VAT number', 'woo-billing-with-invoicexpress' ) | |
$fields['billing']['billing_VAT_code']['label'] = 'My VAT label'; | |
//Change priority - originally 120, 31 is after company | |
$fields['billing']['billing_VAT_code']['priority'] = 31; | |
//Make it half size and on the left | |
$fields['billing']['billing_VAT_code']['class'] = array( 'form-row', 'form-row-first' ); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment