Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change Text Translation Text in WordPress
/**
* Change Give Text
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function give_change_text_callback( $translated_text, $text, $domain ) {
if ( 'give' === $domain ) {
$translated_text = str_replace( "Donation", "Customer", $translated_text );
}
return $translated_text;
}
add_filter( 'gettext', 'give_change_text_callback', 20, 3 );
@raftaar1191

This comment has been minimized.

Copy link
Owner Author

commented Dec 4, 2017

Notes: This can slow down your sites performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.