Created
December 12, 2021 20:06
-
-
Save juliebugmtl/186ad3b7e4c950d879298e09c3a0d561 to your computer and use it in GitHub Desktop.
Modify the default WooCommerce "Street address" label to something else.
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 // only use if needed | |
function modify_street_address_field_label( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Street address' : | |
$translated_text = __( 'Enter your full street address', 'woocommerce' ); | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'modify_street_address_field_label', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment