Skip to content Skip to sidebar

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.

This topic contains 2 replies, has 0 voices.

Last updated by rayaA 3 weeks, 6 days ago.

Assisted by: Shekhar Bhandari.

Author Posts
November 20, 2025 at 7:44 am #17593996

rayaA

Background of the issue:
I am following up on this thread https://wpml.org/forums/topic/email-aligment-is-inccorect-in-woocommerce-mail-sent-to-admin/, where I was told that the fix is scheduled with the next WCML version (back in the end of July), which was released together with WPML 4.8. I is still not fixed. I did try the suggested snippet, which works, except that the email's heading is still aligned incorrectly.

Symptoms:
The email's heading is still aligned incorrectly to the right in a Hebrew email, which should be rtl (with the suggested snippet. without the snippet the whole email is aligned incorrectly).

Questions:
How can we make the email heading align to the correct side?

November 20, 2025 at 9:40 am #17594708

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Would you mind following the below steps and see if it helps.

- Go to WPML->String Translations
- At the bottom of the String Translation page, click on Not seeing strings that you are looking for? tab
- Click on Admin Texts Translations link
- Search for the woocommerce_email_header_alignment there and see if you can find them.
- If you can find it, select it and add it using the “Add to string translation” button
- Click on “Return to String Translations”
- Translate it and for hebrew set it as right.

Let me know if this helps.

Thanks

November 20, 2025 at 1:11 pm #17595844

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Please ignore the previous message, our 2nd tier checked the issue an suggested the following workaround instead.

- Add the following to your theme functions.php file

add_filter( 'pre_option_woocommerce_email_header_alignment', function( $value ) {
    if ( function_exists( 'is_rtl' ) && is_rtl() ) {
        return 'right';
    }
    return $value;
});

Let me know if this helps.

Thanks

November 23, 2025 at 1:06 pm #17602051

rayaA

Thank you, this snippet fixed the problem!