This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 17:00 | 10:00 – 17:00 | 10:00 – 17:00 | 10:00 – 17:00 | 10:00 – 17:00 | - |
- | 18:00 – 19:00 | 18:00 – 19:00 | 18:00 – 19:00 | 18:00 – 19:00 | 18:00 – 19:00 | - |
Supporter timezone: Asia/Kathmandu (GMT+05:45)
Tagged: Compatibility
This topic contains 12 replies, has 0 voices.
Last updated by Shekhar Bhandari 14 hours, 19 minutes ago.
Assisted by: Shekhar Bhandari.
Author | Posts |
---|---|
July 8, 2025 at 2:52 pm #17214786 | |
Ivano |
Background of the issue: Symptoms: Questions: |
July 9, 2025 at 8:30 am #17217505 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Apologies — I know we already went through this yesterday, but unfortunately, we've encountered an unexpected issue with the sandbox database, and I'm no longer able to access it properly. Could I kindly ask you to please do the following again in the sandbox? 1. Install the Order Status Manager for WooCommerce This will allow me to check the email logs. Here’s the sandbox link: Thanks again for your help and patience — I really appreciate it! |
July 12, 2025 at 12:08 pm #17230184 | |
Ivano |
Apologies for delay — I read now your message. Points 1 to 5 are done. Order #104. Thanks. |
July 14, 2025 at 9:17 am #17232655 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
This has been escalated to our Compatibility team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you. |
July 16, 2025 at 6:23 am #17240089 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Can you please try the following? 1. Edit your `functions.php` file (preferably in a child theme) and add the following code: // WPML Workaround add_action( 'woocommerce_order_status_changed', 'switch_language_before_order_email', 5, 3 ); function switch_language_before_order_email( $order_id, $from, $to ) { if ( $to !== 'goods-ready' ) return; $order = wc_get_order( $order_id ); $current_lang = $order ? $order->get_meta( 'wpml_language', true ) : null; do_action( 'wpml_switch_language', $current_lang ); } add_action( 'woocommerce_order_status_changed', 'restore_language_after_order_email', 20, 3 ); function restore_language_after_order_email( $order_id, $old_status, $new_status ) { if ( $new_status === 'goods-ready' ) { do_action( 'wpml_restore_language', null ); } } 2. Edit the plugin file at Find this line: return (string) apply_filters( "wc_order_status_manager_order_status_email_body_text_{$this->id}", $this->format_string( $this->body_text ), $this->object, $this ); Replace it with: $body_text = $this->body_text; if ( class_exists('Sitepress') ) { do_action( 'wpml_register_single_string', 'woocommerce-order-status-manager', "Email {$this->id} - Body text", $body_text ); $body_text = apply_filters( 'wpml_translate_single_string', $body_text, 'woocommerce-order-status-manager', "Email {$this->id} - Body text" ); } return (string) apply_filters( "wc_order_status_manager_order_status_email_body_text_{$this->id}", $this->format_string( $body_text ), $this->object, $this ); 3. Go to WooCommerce > Settings > Emails, open the relevant custom email, and re-save it. 4. Go to WPML > String Translation and search for the email body text under the text domain `woocommerce-order-status-manager`, then provide translations as needed. 5. To test the result, go to WooCommerce > Orders, and change the order status back and forth between “On hold” and “Goods Ready” to trigger the email notification. 6. Check your email logs to confirm if the translated version is being sent. Does it work now? |
July 22, 2025 at 3:54 pm #17260272 | |
Ivano |
Sorry, the email notifications on this ticket were not active, I read now, I will try. |
July 23, 2025 at 10:16 am #17263117 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Ok, let me know how it goes. As for the email notifications, I can see that emails are active for your account now, so I suppose you activated it within the top of this ticket, above the first reply? |
July 24, 2025 at 4:48 pm #17268765 | |
Ivano |
Hi Bruno. Yes, I activated email notification in the top of the ticket 😉 I followed your instructions (points 1 - 6) and it works. But there is a difference with the standard emails. It would be better if they worked like the standard ones. Thanks |
July 25, 2025 at 11:54 am #17270897 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Let me see with our compatibility developer if this is something that can be implemented perhaps through hooks, or if this is something coming from the WooCommerce Order Status Manager and can be only changed within their plugin. I will keep you posted! |
August 12, 2025 at 4:03 pm #17314211 | |
Ivano |
Hello, Thansk |
August 18, 2025 at 6:12 am #17326138 | |
Shekhar Bhandari WPML Supporter since 03/2015
Languages: English (English ) Timezone: Asia/Kathmandu (GMT+05:45) |
Hello there, Our compatibility team confirmed that the emails received will be based on order language instead of user language settings. Let me know if this helps. Thanks |
August 21, 2025 at 2:34 pm #17338021 | |
Ivano |
Hello, If I understand correctly, I need to wait for a new version of the "Order Status Manager" plugin, right? Because the latest version is currently 1.15.6 dated 2025.05.21 and the emails received are based on the user's language settings. Thanks again. |
August 22, 2025 at 4:23 am #17339348 | |
Shekhar Bhandari WPML Supporter since 03/2015
Languages: English (English ) Timezone: Asia/Kathmandu (GMT+05:45) |
Hello there, We don't have a deadline yet, I will update you once we receive confirmations from the compatibility team. Thanks |