Seems like it should be simple, but I can’t figure out how to change the strings "Order #" in emails or "Order Number" in Thank You page.
I want both to read "Web Order #" and "Web Order Number" respectively.
I have tried:
add_filter( 'gettext', 'translate_woocommerce_strings', 999, 3 );
function translate_woocommerce_strings( $translated, $untranslated, $domain ) {
if ( ! is_admin() && 'woocommerce' === $domain ) {
switch ( $translated) {
case 'Order' :
$translated = 'Web Order';
break;
}
}
return $translated;
}
2
Answers
Fixed email by copying email-order-details.php to child theme woocommerce/emails folder and editing line 34:
For the thankyou page you can apply the same as the example above for the e-mails,
on the following line you will find what you are looking for
https://github.com/woocommerce/woocommerce/blob/3.8.0/templates/checkout/thankyou.php#L45