Created
October 22, 2018 04:26
-
-
Save melvinstanly/9611a8d3d5ffebe989119cb06866da89 to your computer and use it in GitHub Desktop.
Functions using the get_text filter
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 custom_wc_translations( $translated_text, $text, $domain ) { | |
if(is_checkout()){ | |
switch ($translated_text) { | |
case 'Replaceble_text' : | |
$translated_text = __('String to Replace', 'Domain'); | |
break; | |
} | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'custom_wc_translations', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment