Last active
July 16, 2018 19:45
-
-
Save grantalltodavid/a0a45b6f8e214fbc1f9ef6d902318ef3 to your computer and use it in GitHub Desktop.
WooCommerce - how to translate/change text labels
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
add_filter( 'gettext', 'custom_translate_woocommerce_20180716', 10, 3 ); | |
function custom_translate_woocommerce_20180716 ( $translated_text, $text, $domain ) { | |
if ( $domain === 'woocommerce' && $translated_text === 'Payment method:' ) { | |
$translated_text = 'Options:'; | |
} | |
return $translated_text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment