Background of the issue:
I am experiencing a critical issue with the integration between WPML and the WooCommerce Bookings plugin on our website. When editing an existing booking, such as changing its status from Paid to Completed, WPML automatically creates a duplicate booking in a secondary language. This seems to be an unintended 'translation' generated by WPML, even though bookings should not be translated. I tried to set the post type to 'untranslatable', but then reservations started to appear three times at the moment the reservation takes place. Here are some screenshots to illustrate the issue: Original booking (default language): hidden link, Duplicated English version: hidden link, Example of duplication after editing: hidden link, and the issue can be seen on this page: hidden link.
Symptoms:
WPML is creating duplicate WooCommerce Bookings when editing them, treating the wc_booking post type as translatable content, which is not desired. Setting the post type to 'untranslatable' causes reservations to appear three times.
Questions:
How can I configure WPML to completely ignore WooCommerce Bookings?
Why does setting the post type to 'untranslatable' cause reservations to appear three times?
Welcome to WPML support. I will answer this ticket before the ticket is assigned to one of my colleagues.
This seems to be a compatibility issue. To be able to report the compatibility issues we need to replicate the issue on a clean installation.
I created a clean installation of WordPress, WPML, and all necessary WPML add-ons.
You can access the WordPress dashboard using the link below: hidden link
Kindly follow the steps below:
- Install the plugin.
- Add a few bookings
- Try to replicate the issue.
This will help us to report the probable issue to the compatibility team and solve the possible problem faster.
Thanks, the update fixed the original issue with duplicate bookings when editing.
However, we've noticed a new problem: when a customer makes a booking, it appears twice in the database, once per language. Even more concerning, each version of the booking seems to have its own stock, which leads to inconsistencies.
From our perspective, a booking should be a single, language-independent record, since it's a transactional item, not content. Could this be related to the same translation handling issue?
Looking forward to your guidance on how to ensure bookings remain unique across languages and stock is correctly managed.
When a visitor books a product, it's expected that an order in each language is created. To avoid overlapping bookings in different languages.
Slots per booking should be handled in this last update. There is an improvement queued for next releases. I am not sure though if we are talking about the same issue.
To better understand your problem, we need to replicate the issue on a clean installation.
I created a clean installation of WordPress, WPML, and all necessary WPML add-ons.
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
- Try to replicate the issue with minimal steps.
- Then let me know the steps to see the problem and reproduce it.