Edit text strings in order emails in WooCommerce on child sites.
Snippet Type
Execute on Child Sites
Snippet
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;
}