mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-30 11:42:22 +08:00
9 lines
599 B
Text
9 lines
599 B
Text
add_filter( 'gettext', 'wc_translate_woocommerce_strings_emails', 9999, 3 );
|
|
|
|
function wc_translate_woocommerce_strings_emails( $translated, $untranslated, $domain ) {
|
|
if ( 'woocommerce' === $domain ) {
|
|
$translated = str_ireplace( 'Hi %s,', '', $untranslated ); // HIDE
|
|
$translated = str_ireplace( 'Just to let you know — we\'ve received your order #%s, and it is now being processed:', 'Your payment was successful and we are now getting ready for shipping. Expect another email from us with tracking details soon!', $untranslated ); // EDIT
|
|
}
|
|
return $translated;
|
|
}
|