Skip to content

Instantly share code, notes, and snippets.

@raftaar1191
Created December 4, 2017 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raftaar1191/ba9b8d901a56eb0f1ea25b9f03a1b27d to your computer and use it in GitHub Desktop.
Save raftaar1191/ba9b8d901a56eb0f1ea25b9f03a1b27d to your computer and use it in GitHub Desktop.
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
Copy link
Author

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