[Resolved] Problem with duplicates while using WooCommerce Bookings
This thread is resolved. Here is a description of the problem and solution.
Problem: You are using WooCommerce Bookings with WPML and encountering an issue where duplicated values in the cart affect booking calculations. Specifically, when booking a certain number of people in one language, the same booking is duplicated in other languages, incorrectly marking days as fully reserved. Solution: Our compatibility team has identified the issue and it has been escalated for further investigation. Currently, there is no direct workaround available. However, we have documented this issue in our errata page which you can check for updates: https://wpml.org/errata/woocommerce-bookings-max-bookings-per-block-not-working-correctly/.
If this solution does not apply to your case, or if it seems outdated, we highly recommend opening a new support ticket. Also, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, you can contact us directly through 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.
Background of the issue:
I am trying to use WooCommerce Bookings with WPML, but I encountered a problem with duplicates in my booking system. After contacting WooCommerce support, I found out that WPML causes duplicated values in the cart, affecting booking calculations. I tried changing settings in the WooCommerce Multilingual & Multicurrency tab, specifically setting 'Switching languages when there are items in the cart' and 'Switching currencies when there are items in the cart' to 'Prompt for a confirmation and reset the cart', but the issue persists. The issue can be seen on this page: hidden link
Symptoms:
The booking system creates duplicated values in the cart, causing issues in booking calculations. When I reserve 69 persons for a specific date and try to book the remaining 1 spot, the system incorrectly marks the day as fully reserved.
Questions:
How can I resolve the issue of duplicated values in the cart caused by WPML?
Why does disabling WPML make the booking system work correctly?
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Madrid (GMT+01:00)
Our second tier has identified the problem (when a booking is made it is duplicated to other languages with the same number of people, so if you book 20 people in English it will also create a booking for 20 people in Spanish for the same date.
The issue has been escalated to the compatibility team.
I will let you know when I have some news.