• Hi Support.

    I got weird behavior. My client’s website is Thai language as default setting.
    There are admin 1 who setup his language to English. And
    admin 2 who setup his language to Thai (Default site)

    When admin 1 do some action on orders that sending email. ex: processing, completed, etc. Customer will get English language email.

    When admin 2 do some action on orders that sending email. ex: processing, completed, etc. Customer will get Thai language email.

    What I expected. Customer should get Thai language email which is the default site’s setting.

    Thank you

Viewing 10 replies - 16 through 25 (of 25 total)
  • Hello.
    Is there any updates on this? A temp solution would be to check locale but it makes .po useless

    Same problem here and it lead me here where I found out that it hasn’t been fixed after a whole year!

    Please fix this! It’s been a year! this is embarrassing…
    Is there any trick we can do to change the dashboard language only on the surface?!

    • This reply was modified 3 years, 11 months ago by trulysaber.

    This could be something useful to me… Just tried but didn’t work though, with a user in the English language, the emails sent are still under the WP site language (which is not English).

    Any idea?

    Edit: It seems the admin emails will be sent under the user’s language, but the emails to the customers remain in the WP site language.

    • This reply was modified 3 years, 10 months ago by loyukfai.

    I have the same issue: WooCommerce emails to Admin AND customers are sent in language based on Admin language, who changes the status of an order.

    It was driving me mad until I found this topic here and tested to understand what’s going on.

    I have a support ticket open with WooCommerce. Let’s what they say.

    It’s unbelievable that this hasn’t been fixed for a year. It’s impossible to work like this!

    I previously had a plugin that changes the WP admin language to English while the site language is another one, but this causes translation issue with some WooCommerce emails (they will be suddenly in English for some parts), so I had to deactivate.

    • This reply was modified 3 years, 10 months ago by alphax.
    Majid

    (@majidempire)

    Hi
    The bug is still here after 17 Month and multiple versions of WC, but no response from Woocommerce authors :((((((((
    WC authors, Please note that this is not Multi language plugin providers, it is a core feature that WC should have

    Dear Woocommerce Team,

    Is there any update or can you at least confirm that investigation of the issue is ongoing?

    Same issue here… it looks so unprofesionnal to have emails order confirmation and next emails sent not in the same langage.

    Same problem here
    I spent the last 5 hours trying to find what’s going on

    Hello

    Step 1 :
    Disable mail auto

    add_action( 'woocommerce_email', array(get_class(),'disable_auto_email_customer_completed_order') );

        public static function disable_auto_email_customer_completed_order( $email_class ) {
    
          remove_action( 'woocommerce_order_status_completed_notification', array( $email_class->emails['WC_Email_Customer_Completed_Order'], 'trigger' ) ); // cancels automatic email of order complete status update.
        }


    Step 2 :
    Send manually with switch lang and trad strings

         add_action( 'woocommerce_order_actions', array(get_class(),'add_order_action') );
           add_action( 'woocommerce_order_action_send_wc_email_customer_completed_order', array(get_class(),'send_wc_email_customer_completed_order') );
    
        public static function add_order_action( $actions ) {
          $actions['send_wc_email_customer_completed_order'] = 'Envoyer l\'email de commande terminée';
          return $actions;
        }
    
        public static function send_wc_email_customer_completed_order( $order ) {
          global $sitepress;
    
          $order_id = $order->get_id();
          $lang = get_post_meta( $order_id, 'wpml_language');
          if (!empty($lang)) {
            $sitepress->switch_lang( $lang[0], true );
          }
    
          $allmails = WC()->mailer()->emails;
          $email = $allmails['WC_Email_Customer_Completed_Order'];
          $email->settings['subject'] = __('Votre commande est dans les starting-blocks','admin_texts_woocommerce_customer_completed_order_settings');
          $email->settings['heading'] = __('Et une commande prête à partir, une !','admin_texts_woocommerce_customer_completed_order_settings');
          $email->settings['additional_content'] = __('Encore merci de votre confiance.
    
    Team hellowall','admin_texts_woocommerce_customer_completed_order_settings');
    
          $email->trigger( $order_id );
          $order->add_order_note( 'Email "Commande terminée" envoyé' );
        }
        public static function add_order_action( $actions ) {
          $actions['send_wc_email_customer_completed_order'] = 'Envoyer l\'email de commande terminée';
          return $actions;
        }
    
        public static function send_wc_email_customer_completed_order( $order ) {
          global $sitepress;
    
          $order_id = $order->get_id();
          $lang = get_post_meta( $order_id, 'wpml_language');
          if (!empty($lang)) {
            $sitepress->switch_lang( $lang[0], true );
          }
    
          $allmails = WC()->mailer()->emails;
          $email = $allmails['WC_Email_Customer_Completed_Order'];
          $email->settings['subject'] = __('Votre commande est dans les starting-blocks','admin_texts_woocommerce_customer_completed_order_settings');
          $email->settings['heading'] = __('Et une commande prête à partir, une !','admin_texts_woocommerce_customer_completed_order_settings');
          $email->settings['additional_content'] = __('Encore merci de votre confiance.
    
    Team hellowall','admin_texts_woocommerce_customer_completed_order_settings');
    
          $email->trigger( $order_id );
          $order->add_order_note( 'Email "Commande terminée" envoyé' );
        }
Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘[Bug] Email’s language depend on Admin’s setting preferences’ is closed to new replies.