Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
When placing an order from a bookable product, the client receives the order confirmation in all languages instead of just the language in which the order was placed. This happens even after translating the emails.
Solution:
This issue might be related to the 'Check this box if the booking requires admin approval/confirmation. Payment will not be taken during checkout' option in WooCommerce Bookings. Here are the steps we recommend:
1. Ensure that WordPress, all plugins, and the theme are updated to the latest versions.
2. Make a backup of your website.
3. Navigate to the

.../wp-content/plugins/woocommerce-multilingual/compatibility/WcBookings/Emails.php

file and locate line# 63.
4. Directly below it, insert the following code:

add_action( 'woocommerce_booking_pending-confirmation', $this->handle([\WC_Email_Booking_Pending_Confirmation::class]), self::PRIORITY_BEFORE_EMAIL_TRIGGER );

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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 4 replies, has 3 voices.

Last updated by Waqar Ali 1 year, 4 months ago.

Assisted by: Waqar Ali.

Author Posts
March 9, 2024 at 1:41 pm #15391491

duyN-6

I am trying to: place an order from a bookable product, but the I received the order confirmation in all languages we got on our website.

Link to a page where the issue can be seen: hidden link

I expected to see: the confirmation in the language that I was placing the order.

Instead, I got: notifications for that product in all languages

March 9, 2024 at 2:57 pm #15391585

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

WooCommerce E-mail needs to get translated at WPML > String Translation.

If you go to the WooCommerce Email editing screen you should find links that lead you directly to their translations.

Did you already completed those translations?

If not, please follow this guide:
https://wpml.org/documentation/related-projects/woocommerce-multilingual/how-to-translate-woocommerce-emails/

If yes, and the issue persists, please confirm if the issue only occurs once you send emails as an admin user or if the email also has the wrong content if a user purchases Frontend.

Best regards
Andreas

March 12, 2024 at 4:46 am #15397696

duyN-6

The issue still there after I translated the emails.
That is the Order Confirmation email. Here is its rule as example:
1. Customer completed an order on the frontend in Chinese.
2. If the website has 10 languages, it will send out 10 order confirmation emails. All are in Chinese, but with 10 different Booking IDs and 10 Product Names in different languages.
Please try to place an order and you will receive the emails to see that issue.
Tks!

March 12, 2024 at 7:21 am #15397837

Waqar Ali

Hi,

Thank you for sharing this update.

We've recently received another report about this same issue when the WooCommerce Bookings plugin is involved. This is under investigation and I've added your voice to this matter too.

I don't have any fix or workaround to share at the moment but will keep you updated on the progress, through this ticket.

regards,
Waqar

March 13, 2024 at 6:41 am #15402078

Waqar Ali

I've received an update from our compatibility team.

This seems to be related to the "Check this box if the booking requires admin approval/confirmation. Payment will not be taken during checkout" option in WooCommerce Bookings. One way to fix this would be to deactivate it in case you don't need it.

If yes, a temporary workaround would be this:

1). Please make sure that WordPress, plugins, and the theme are updated to the latest versions

2). Make a backup of the website.

3). Edit the file .../wp-content/plugins/woocommerce-multilingual/compatibility/WcBookings/Emails.php file and look for line# 63.

4). Just below it, add this code:

add_action( 'woocommerce_booking_pending-confirmation', $this->handle( [
    \WC_Email_Booking_Pending_Confirmation::class,
] ), self::PRIORITY_BEFORE_EMAIL_TRIGGER );

Please let us know how it goes. Once confirmed, we'll include it in one of the next WooCommerce Multilingual plugin releases.

March 13, 2024 at 7:09 am #15402165

duyN-6

It works perfectly. Thank you!