Skip to content

Instantly share code, notes, and snippets.

@ahmedeshaan
Created July 21, 2017 13:43
Show Gist options
  • Save ahmedeshaan/a42394c39d226f5a3d27af07bc1a93bd to your computer and use it in GitHub Desktop.
Save ahmedeshaan/a42394c39d226f5a3d27af07bc1a93bd to your computer and use it in GitHub Desktop.
function my_custom_translations( $strings ) {
$text = array(
'Related products' => 'Customers Also Viewed',
'Some other one you like to translate/change' => 'Translate/Change'
);
$strings = str_ireplace( array_keys( $text ), $text, $strings );
return $strings;
}
add_filter( 'gettext', 'my_custom_translations', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment