Last active
July 20, 2020 18:43
-
-
Save vikastyagi87/050aac9409e2ddd7c28971393922d572 to your computer and use it in GitHub Desktop.
Replace some WooCommerce text
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
/** | |
* filter translations, to replace some WooCommerce text with our own | |
* @param string $translation the translated text | |
* @param string $text the text before translation | |
* @param string $domain the gettext domain for translation | |
* @return string | |
*/ | |
function replace_some_woocommerce_text($translation, $text, $domain) { | |
switch ($text) { | |
case 'Direct bank transfer': | |
$translation = 'Payme'; | |
break; | |
} | |
return $translation; | |
} | |
add_filter('gettext', 'replace_some_woocommerce_text', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment