Skip Navigation

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.

Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Sun Mon Tue Wed Thu Fri Sat
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

Tagged: ,

This topic contains 23 replies, has 5 voices.

Last updated by Itamar 9 months, 1 week ago.

Assisted by: Itamar.

Author Posts
June 17, 2024 at 12:53 pm #15745477

viktorO

Background of the issue:
Even though all related post types are set to "Not translatable", WPML M&M makes duplicates for WC Bookings.
We already followed "the solution" in https://wpml.org/forums/topic/multilingual-multicurrency-duplicates-orders-in-woocommerce-booking/ but it does not help. We did split and made separate products for each language.
Fortunately there's no duplicate for untranslated English product, but when we do the same with untranslated product in other language, WPML M&M does an empty "translation" which breaks Woocommerce stats and logic for further Calendar and Payment replications.

Symptoms:

Questions:

June 17, 2024 at 6:37 pm #15746733

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly.

Please check this other ticket, where we explain why Bookings behave like that with WPML.
https://wpml.org/forums/topic/multilingual-multicurrency-plugin-duplicates-orders-in-woocommerce-booking/

If that does not help, one of my colleagues will soon come to continue support.

June 18, 2024 at 8:39 am #15747882

viktorO

Hi Lucas, thanks. I've checked possible solutions in the support forum, including this one mentioned, but none of them seem related to the issue.

"What you are describing is the normal behavior we are having. As you show us, the order is 1, but we are duplicating the booings between languages in order to maintain the availability sync between languages."

This should not be a normal behavior, there should be another way to maintain availability.

Virtual bookable product may have translations in different languages, but WC Booking should not be duplicated, as it consequently makes duplicates in Google Calendar and dummy records in bookings' stats.

I'd like to provide admin access to the staging site I've made for this issue for the support person to check.

Please advise how can I safely provide access credentials.

Thanks

June 23, 2024 at 8:52 am #15793003

viktorO

5 days for a reply is too much, don't you think?

June 24, 2024 at 11:32 am #15806413

George Botsev
WPML Supporter since 02/2014

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

Hello!
Please excuse us for the slow response times in our support during the weekends.

As for what you report in relation to Google Calendar synchronization, at present we have a registered bug for duplicated bookings and our developers are working on fixing the problem.

However, at this time, we don't have a patch for that issue.

June 24, 2024 at 11:35 am #15806420

George Botsev
WPML Supporter since 02/2014

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

About the issue with the duplicated booking stats, it would be nice if you can share more information with us and provide for example a screenshot of the issue.
Please do note to obfuscate any private information in that image.

June 24, 2024 at 7:57 pm #15811048

viktorO

Though WC Booking is set to Not Translatable, it is actually translated and duplicated in all languages. Resulting in broken dashboard numbers, double bookings in Google Calendar, double Zoom links. On the bookings.png image names are hidden and it's hard to understand, but all those bookings are RUS+ENG versions for no reason.
We also tried to split product translations and do completely separate language versions, one per language, without translations, but WC Bookings are still duplicated.

post_type.jpg
order.png
dashboard.jpg
bookings.png
June 26, 2024 at 6:10 pm #15836542

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

I do have a few questions:

- Do you see any config issues at WooCommerce > WooCommerce Multilingual & Multi-Currency > Status? If so, please send us a screenshot from this screen.

- Does the issue disappear if you disable the plugin "WPML Synchronize Post Status"?

- Could it be that the issue only occurs once another plugin is enabled, like for example "WooCommerce Order Status Control"?

Further, would you be able to install the latest version of "WooCommerce Bookings" on a test site which I would like to provide, so that we can confirm if this is a general bug and take further steps?

Let me know if this would be possible and I will send a link to a test site with WPML and WooCommerce installed.

Best regards
Andreas

June 27, 2024 at 7:38 am #15841359

Itamar
WPML Supporter since 02/2016

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I'll continue to help you with this issue.

I want to make things clear. The issue you reported about duplicate entries in Google Calendar is known to us and escalated to our developers. As Goerge, my colleague, mentioned, we currently don't have a workaround for it. So, what we are trying to investigate now is the dummy records in bookings' stats.

We need to replicate this issue on a fresh WordPress installation. Then, I'll be able to escalate it to our compatibility team. For this, I created a test website with a clean WordPress install. You can access it through this link:

hidden link

With this link, you'll be directly logged in.

Could you please install the WooCommerce Bookings plugin and see if the issue is replicable on a clean WordPress installation?

I already configured WPML and WooCommerce on the test site. WPML is set to have Russian as the default language and English as the second language.

Please also ensure you install the latest version of the plugin.

Please let us know when everything is finished, and you can replicate the problem.

Important! Do not import your site to the test site. We must replicate the problem on a fresh, clean WordPress installation.

Thanks,
Itamar.

June 27, 2024 at 6:13 pm #15846008

viktorO

@Andreas

Do you see any config issues at WooCommerce > WooCommerce Multilingual & Multi-Currency > Status?

NO

- Does the issue disappear if you disable the plugin "WPML Synchronize Post Status"?

NO

- Could it be that the issue only occurs once another plugin is enabled, like for example "WooCommerce Order Status Control"?

NO, unrelated.

Further, would you be able to install the latest version of "WooCommerce Bookings" on a test site which I would like to provide, so that we can confirm if this is a general bug and take further steps?

Sure!


@Itamar

Done. It's even worse here: made a single bookable consultation product, placed an order and somehow after the order was completed there are 4 (four) bookings!

Though, ideally, I would like to make wc_booking post type "Not translatable" and for one order I should have one booking in the system.

Please check backend and let me know what else I can do to help debug the issue.

June 28, 2024 at 11:43 am #15851540

Itamar
WPML Supporter since 02/2016

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks a lot for replicating the issue on the test site.

I'll further esclate it to our compatibility team.

However, just to be sure, can you please confirm that the problem is what can be seen in the admin dashboard? Please see the attached screenshot.

Please note that my weekend is Friday-Saturday, and I can escalate this issue on Sunday.

Thanks,
Itamar.

Screenshot 2024-06-28 144035.jpg
June 28, 2024 at 9:10 pm #15854274

viktorO

Yes, this one is bad, bad the Booking screen is even worse.
This was a SINGLE booking in one language.

bookings.png
June 30, 2024 at 6:26 pm #15863105

Itamar
WPML Supporter since 02/2016

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks!

The issue has been escalated to our second-tier supporters. I'll update you once I have news about it.

Regards,
Itamar.

July 7, 2024 at 2:14 pm #15907549

Itamar
WPML Supporter since 02/2016

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Updste
This issue has been escalated to our developers. Our second-tier supporter suggests the following workaround. Please add the following code to the functions.php file of your theme.

add_filter( 'query', 'testfix' );
function testfix( $var ) {
	if ( strpos( $var, "SELECT COUNT(DISTINCT wcbookings.ID) AS count" ) !== false ) {
		$pattern     = "/(FROM wp_posts AS wcbookings\s+INNER JOIN wp_wc_orders AS wcorder\s+ON wcbookings\.post_parent = wcorder\.id)/";
		$replacement = "$1
    INNER JOIN wp_icl_translations AS translations
        ON wcbookings.ID = translations.element_id";
		$var         = preg_replace( $pattern, $replacement, $var );
		$var         .= " AND translations.source_language_code IS NULL";
	}

	return $var;
}

We'll keep you updated when we have news about this issue.

I appreciate your patience.
Itamar.

July 10, 2024 at 9:14 am #15926865

viktorO

Hi, thanks. Looks good at your Sandbox site (added the code with Code Snippets).
But I wonder if would be possible to have single Booking while making wc_bookings post type as Not Translatable, as currently it is set to Translatable by default.

screenshot 1.jpg
screenshot.jpg