Skip to content

Instantly share code, notes, and snippets.

@Pavracer
Last active May 9, 2021 15:06
Show Gist options
  • Save Pavracer/554dbab266f4d3a8fa2d26e71dd252bc to your computer and use it in GitHub Desktop.
Save Pavracer/554dbab266f4d3a8fa2d26e71dd252bc to your computer and use it in GitHub Desktop.
function et_theme_update_strings( $default_translated_text, $original_text, $domain ) {
$message = '';
if ( $original_text === 'Coupon code' ) {
$message = 'Coupon test';
}
if ( $original_text === 'Apply coupon' ) {
$message = 'Apply test';
}
if ( $original_text === 'Update cart' ) {
$message = 'Update test';
}
if ( $original_text === 'Proceed to checkout' ) {
$message = 'Proceed to test';
}
if ( ! empty( $message ) ) {
return $message;
}
return $default_translated_text;
}
add_filter( 'gettext', 'et_theme_update_strings', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment