Last active
July 20, 2021 20:16
-
-
Save clifgriffin/ddc7b7b1d8fa25f05459920f9c487b00 to your computer and use it in GitHub Desktop.
Change apt field label
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 | |
// Do NOT include the opening php tag. | |
// Place in your theme's functions.php file | |
/** | |
* CheckoutWC 2.18.0+ | |
* | |
* Change shipping and billing address 2 label | |
*/ | |
add_filter( 'woocommerce_default_address_fields', 'custom_override_address2_label', 200000, 1 ); | |
function custom_override_address2_label( $address_fields ) { | |
$address_fields['address_2']['label'] = $address_fields['address_2']['placeholder'] = 'Apartment Number'; | |
return $address_fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment