Woocommerce email change text

hi there :slight_smile: my shop under https://leimana.ch/preview is almost ready, but there is still something weird:

when i check my confirmation email, there is still one word written in english (and not german). please have a look:

there is one part in the middle of the email “additional info”. how can i edit this text? i tried everything:

  1. changed .mo + .po files
  2. deleted all email-customize plugins
  3. tried to add filter in functions.php

i would be so glad if you could help me. thx a lot

Hi,

You can try adding this in your child theme’s functions.php


add_filter( 'gettext', 'translate_mytext', 20, 3 );
function translate_mytext( $translated_text, $text, $domain ) {
        if( $translated_text=="Additional Info" ) {           
                $translated_text = "Zusätzliche Information";               
        }
    return $translated_text;
}

Hope that helps.

hi,

thanks for your reply. i pasted this code in the functions.php and uploaded it to the server, then i was emptying my browser cache and i made a test-order with 3 different browsers – and in my email-confirmation the part “additional info” was still there…

do you have any other ideas?

thx & cheers

Hello There,

Thanks for updating in! Do you have a child theme and have WooCommerce email template override in it? If not, did you also translated WooCommerce plugin correctly? Hello There,
​
​To assist you better with this issue, would you mind providing us the url of your site with login credentials, if necessary, so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password (only if necessary)

  • FTP Hostname
  • FTP username
  • FTP password

Thank you.

hi there

yes, i have a child theme and the woocommerce template should be overwritten. anyway, here are my logins:

thx & cheers
gabriel

Hello There,

Thanks for writing in! It seems that you have added your translation files in the child theme. The problem is that it has a wrong file name. It should be __x__-de_DE.po and __x__-de_DE.mo. The WooCommerce email template is using the default. It seems that you can’t find the “Additional Information” in the woocommerce.pot file. I would highly recommend that you customize your WooCommerce emails by using a 3rd party plugins instead. You can check out any of these plugins right here: https://wordpress.org/plugins/search/WooCommerce+Email+Customizer/

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.