-
-
Save eder-dias/510c008c40eeb60f9a5fe17facd9bb7f to your computer and use it in GitHub Desktop.
Change any text string in WordPress & WooCommerce
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
function wc_translate_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Related Products' : | |
$translated_text = __( 'Like this? Try these:', 'woocommerce' ); | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'wc_translate_strings', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment