Skip to content

Instantly share code, notes, and snippets.

@JudeRosario
Last active January 28, 2016 17:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JudeRosario/3de2a47f7954e0a01e94 to your computer and use it in GitHub Desktop.
Save JudeRosario/3de2a47f7954e0a01e94 to your computer and use it in GitHub Desktop.
WooCommerce Billing Text Fix
function custom_wc_text( $translated_text, $untranslated_text, $domain ) {
switch ( $untranslated_text ) {
case 'The Customizer allows you to preview changes to your site before publishing them. You can also navigate to different pages on your site to preview them.' :
$translated_text = 'Put Text Here' ;
break;
}
return $translated_text;
}
add_filter( 'gettext', 'custom_wc_text', 20, 3 );
function custom_wc_text( $translated_text, $untranslated_text, $domain ) {
if ( is_checkout()|| is_cart() ) {
switch ( $untranslated_text ) {
case 'Billing Details' :
$translated_text = 'Shipping Details' ;
break;
}
}
return $translated_text;
}
add_filter( 'gettext', 'custom_wc_text', 20, 3 );
@JudeRosario
Copy link
Author

Just copy/paste the code into the functions.php file of your child theme or a site specific plugin if you use one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment