Skip to content

Instantly share code, notes, and snippets.

@billrobbins
Last active January 14, 2019 20:25
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 billrobbins/310b4823be7e1e687d8b6f0968e74426 to your computer and use it in GitHub Desktop.
Save billrobbins/310b4823be7e1e687d8b6f0968e74426 to your computer and use it in GitHub Desktop.
Place the original text on the left of the => and the new text on the right.
function change_deposit_text( $translated ) {
$text = array(
'The minimum order quantity for %s is %s - please increase the quantity in your cart.' => 'Ahh man, For %s you need a total of %s to order',
);
$translated = str_ireplace( array_keys($text), $text, $translated );
return $translated;
}
add_filter( 'gettext', 'change_deposit_text', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment