Skip Navigation

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

Problem:
The client is experiencing an issue where using "WooCommerce Booking" with "WooCommerce Multilingual & Multicurrency" results in the duplication of bookings. Even when Bookings are set as non-translatable, orders, including those in the cart, are duplicated, leading to all available slots for a day being filled prematurely when the plugin is active.

Solution:
We recommend duplicating the bookable products into the second language without translating them. You can follow the steps in our documentation on using different translation editors for different pages.

If the issue persists, we suggest replicating the problem on a clean WordPress installation to help us identify if there is a compatibility issue. We provided a sandbox environment for this purpose.

Additionally, we clarified that the slot is the number of bookings per day, not the number of persons per booking. If you want to set 1 person per slot, you should adjust the product settings accordingly under the Persons tab by setting the Min and Max person to 1.

If this solution does not seem relevant to your situation, please open a new support ticket in our support forum.

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 10 replies, has 2 voices.

Last updated by Antonio Molinari 1 year, 5 months ago.

Assisted by: Long Nguyen.

Author Posts
October 26, 2023 at 7:35 am #14666959

Antonio Molinari

Hi,

We have situation where using "WooCommerce Booking" with "WooCommerce Multilingual & Multicurrency" generates a problem with duplication of bookings.

We don't want Bookings or Products be translatable because this generate an error with available slots number per day, but even if the Bookings are flagged as non translatable the orders (even the In Cart ones) are duplicated. This is a problem because all the slots available for that days runs out after half of the order.

When I deactivate the plugin, and test again, the duplication does not happen.

We already seen this thread: https://wpml.org/forums/topic/multilingual-multicurrency-plugin-duplicates-orders-in-woocommerce-booking/ before but you said that the behavior of the plugin is correct. Is there a way to avoid this?

Thanks

October 27, 2023 at 2:56 am #14674889

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Antonio,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

If you don't want to translate the bookable products, please try to duplicate them into the second language. Following the documentation https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

If it does not help, please help me to replicate the issue on a clean installation of WordPress. You can login directly to the admin area with this link hidden link

Look forward to your reply.
Thanks

November 3, 2023 at 9:25 am #14723759

Antonio Molinari

we disabled "WooCommerce Multilingual & Multicurrency" plugin because it duplicates posts with uc_booking post type. The guys from "Woocommerce bookings" (official plugin) suggested to use "WooCommerce Multilingual & Multicurrency", but we cannot afford duplicated bookings, one for each language: that way "Woocommerce bookings" plugin sees mote bookings that real ones

November 6, 2023 at 1:33 am #14734313

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

It is normal behavior when activating WPML and WooCommerce Multilingual & Multicurrency. However, the order and slot should be synced across languages. I've tested this issue again on my demo site but do not see that.

Can you please help me to replicate your case on a clean installation of WordPress? If it is a compatibility issue, I will report it to our Compatibility team to check this. You can access the WordPress dashboard using the link below:
hidden link

Kindly follow the steps below:

- Don’t restore your site there.
- Install WooCommerce Bookings plugin.
- Try to replicate the issue with minimal steps.
- Then let me know the steps to replicate it.

Thanks for your co-operation.

November 7, 2023 at 8:37 am #14744327

Antonio Molinari

Hi Long,

we replicated the environment and were able to replicate the problem. I'll show you the steps for verification:

– In Sandbox we activated Woocommerce Bookings but disabled the translatable opts for Bookings and Products

– We created a product called FORFAIT and setup an availability of max 4 reservations per day: hidden link.

– In frontend you can see the calendar: hidden link. We selected from 2 different device a reservation for 1 people (total of 2) adding it in the cart (without proceed to checkout)

– In Bookings list you can see every reservation was duplicated and we have a total of 4 elements in cart: hidden link which obviously blocks all availability for that specific day

– Consequently we find ourselves with a reservation FOR EACH ACTIVE LANGUAGE, which is calculated/scaled from the total availability

– Furthermore, there are some visual bugs in Bookings page which you can't see the number of products with In Cart status: hidden link and sometimes you need to add some query for the language to the URL to show them up

This is the problem as it also appears on our site. Let us know if you need any more details or if you want to help in any way. Thank you

Screenshot 2023-11-07 alle 09.36.57.jpg
Screenshot 2023-11-07 alle 09.36.46.jpg
Screenshot 2023-11-07 alle 09.36.39.jpg
November 8, 2023 at 2:04 am #14752497

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

This issue occurs after you set the post type Bookings (wc_booking) to Not translatable. By default the translation preference of this post type is "Translatable - only show translated items" and locked. In the admin area, the booking is duplicated per language but the data is synced across languages as I mentioned above.

I set the translation preference back to "Translatable - only show translated items" and create a new product Forfait (WPML) and do the same step: "select from 2 different devices a reservation for 1 person (total of 2) adding it in the cart (without proceed to checkout)" and do not see the slot go out.

Let me know if you have an issue when Bookings is set to translate by default.

November 9, 2023 at 8:40 am #14763151

Antonio Molinari

Hi Long,

Yes, we know that Booking is set as non-translatable, this is intentional. In fact, if we leave the Booking translatable we must also make the Product translatable (as you did in the sandbox), and if we therefore have a translated version of the product what happens is that the total booking slots (e.g. maximum 4 per day) are duplicated, and by purchasing a product in one language reduces slots only for the product in that language!

For this reason we had to set up a single monolingual product and therefore make it non-translatable together with the Booking content type.

Let me know if you have any additional suggestions or ideas on how to find a workaround

November 9, 2023 at 10:36 am #14764743

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

if we therefore have a translated version of the product what happens is that the total booking slots (e.g. maximum 4 per day) are duplicated, and by purchasing a product in one language reduces slots only for the product in that language!

Can you please try to replicate this issue on the sandbox site? Currently, I do not see that. The slots are synced across languages. You can duplicate the product in Spanish and recheck this issue.

Look forward to your reply.
Thanks

November 9, 2023 at 12:06 pm #14766211

Antonio Molinari

Hi Long,

Is already present the issue: now the Forfait (WPML) product has a maximum slot of 2 but this is interpreted as 2 slots for English and 2 for Spanish, for a total of 4 slots, while we want the number of slots set for a product to be fixed regardless of the language.

As you can see in my attached image I'm able to put in the cart 2 product for EN and 1 other product for ES.

I imagine this is a problem with the Booking plugin rather than yours, and I understand it. We just wanted to get your point of view.

Let me know if everything is clear.
Thanks

Screenshot 2023-11-09 alle 13.02.25.jpg
November 10, 2023 at 2:47 am #14771929

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I think we understand the slot differently. The slot here is the number of bookings per day (block), please check the screenshot attached. It's not the number of persons for each slot as in your screenshot. I only see a total of 64 EUR = 2 slots (bookings) in the cart and I see it still works correctly.

I also create a screen record of view of two customers on my end, here is the URL hidden link

If you want to set 1 person per slot (booking), you can edit the product > Persons tab > Min and Max person: 1.

Look forward to your reply.
Thanks

Edit product “Forfait (WPML)” ‹ Sandbox — WordPress 2023-11-10 09-35-14.png
November 10, 2023 at 10:27 am #14774987

Antonio Molinari

Ok, I agree that there is something unclear. The setup I need to obtain requires that there is a single product with 50 slots available but with a single order all the slots can be filled if the user specifies that there are 50 people in his order.

Now, on the sandbox the product is set for a maximum of 2 daily blocks. So I can have maximum 2 people that day. However, if I put 1 reservation for 2 people in the cart, the calendar is still green, and I can add other people up to a maximum of 4! And this is obviously a problem.

It probably doesn't depend on WPML and is more a problem with the Bookings plugin or the way it manages the creation of slots/blocks.

Thanks anyway