Last active
February 24, 2022 12:51
-
-
Save manuelhudec/bd6c10b705189406b672373aea9673df to your computer and use it in GitHub Desktop.
WooCommerce - Customer account: Enable "Label" for billing and shipping address
This file contains hidden or 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
// Billing Fields. | |
add_filter( 'woocommerce_billing_fields', 'custom_woocommerce_billing_fields' ); | |
function custom_woocommerce_billing_fields( $fields ) { | |
$fields['billing_address_2']['label'] = 'Address 2'; | |
$fields['billing_address_2']['label_class'] = ''; | |
return $fields; | |
} | |
// Shipping Fields. | |
add_filter( 'woocommerce_shipping_fields', 'custom_woocommerce_shipping_fields' ); | |
function custom_woocommerce_shipping_fields( $fields ) { | |
$fields['shipping_address_2']['label'] = 'Address 2'; | |
$fields['shipping_address_2']['label_class'] = ''; | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment