Skip to content

Instantly share code, notes, and snippets.

@juliebugmtl
Created December 12, 2021 20:06
Show Gist options
  • Save juliebugmtl/186ad3b7e4c950d879298e09c3a0d561 to your computer and use it in GitHub Desktop.
Save juliebugmtl/186ad3b7e4c950d879298e09c3a0d561 to your computer and use it in GitHub Desktop.
Modify the default WooCommerce "Street address" label to something else.
<?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