This thread is resolved. Here is a description of the problem and solution.
Problem:
Since WooCommerce Multilingual & Multicurrency 5.3, a bug prevents multiple WooCommerce Bookings reminders scheduled at the same time from being sent. Only the first reminder is sent due to the
sendWithoutDuplicates()
function in
woocommerce-multilingual/WcBookings/Emails.php
, which disables
woocommerce->mailer()
after the first email is sent, assuming no other emails need to be sent afterward.
Solution:
We have included a fix for this issue in our latest update. Please ensure you have tested the package to confirm the resolution. If you are still experiencing issues or the solution provided here does not resolve your problem, we 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 do not hesitate to open a new support ticket for further assistance. You can do so at WPML 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.
Tagged: Compatibility
This topic contains 19 replies, has 2 voices.
Last updated by Laura 3 weeks, 1 day ago.
Assisted by: Laura.
Author | Posts |
---|---|
February 9, 2024 at 2:02 pm #15286364 | |
Verbal |
Hello, Since WooCommerce Multilingual & Multicurrency 5.3, a bug prevents multiple Woocommerce Bookings reminders scheduled at the exact same time to be sent (only the first one is sent). If a (or several) booking product(s) allow(s) for multiple bookings at the exact same time, scheduled wc-booking-reminder WP Cron events will fail silently (with no error/log) after the first reminder is sent. This is due to public function sendWithoutDuplicates( $bookingId, $class ) in woocommerce-multilingual/WcBookings/Emails.php disabling woocommerce->mailer() after the first email is sent: Disabling entirely woocommerce->mailer() to prevent duplicates is a bit brutal / assumes no other emails have to be sent afterward. I've temporarily patched this bug using this (rather inelegant) fix: /** Could you check this bug and patch sendWithoutDuplicates(), using a better way to handle duplicates (without disabling woocommerce->mailer() )? Regards, |
February 12, 2024 at 9:22 am #15291649 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Hi, thanks for contacting us. To send the ticket to the compatibility team I need to have the issue reproduced on a Sandbox or on a staging site. I see you're using a staging, would it be possible to have a copy and/or access to the site? |
February 12, 2024 at 1:35 pm #15293369 | |
Verbal |
Hello Laura, If you create a sandbox, you can reproduce the bug like this: You may also share my initial message as is with the compatibility team: the bug present in public function sendWithoutDuplicates( $bookingId, $class ) is easy to spot (once you're there): they'll see/understand the issue right away. Regards, |
February 13, 2024 at 2:49 pm #15298165 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
I tried to reproduce the issue here hidden link but I don't see any email sent, not even when I try to send a notification to Bookings > Send notification (you won't receive any mail but I can still see which mails are being sent by WordPress) Am I missing some settings? |
February 13, 2024 at 3:21 pm #15298582 | |
Verbal |
The two orders placed had the "Processing" status (waiting for payment upon delivery) and thus bookings were not confirmed. I took the liberty of installing "Log Emails" and "WP Control" (now available in Tools/Log Emails and Tools/Cron Event). You'll see scheduled cron events (search for wc-booking-reminder) and emails sent. In order to test reminder emails sent by cron, you'll have to enable CRON on the sandbox (currently disabled: The DISABLE_WP_CRON constant is set to true.) When you do, you'll likely notice that a reminder is sent, but the others aren't. Regards, |
February 13, 2024 at 6:26 pm #15299210 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
I see only one mail is sent, but it happens also if WPML is disabled so how this is a WPML issue? |
February 13, 2024 at 7:50 pm #15299347 | |
Verbal |
Disabling all WPML plugins lets all emails being sent properly. Maybe using the same account/email to create bookings leads to receiving only one notification? Could you double-check: I created bookings #127 and #131. Both emails were successfully scheduled and sent (see attached screenshots). This is a WPML-specific bug: sendWithoutDuplicates( $bookingId, $class ) in woocommerce-multilingual/WcBookings/Emails.php Regards, |
February 14, 2024 at 9:58 am #15301035 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Hi, thanks for the patience. I sent the issue to the devs. I'll keep you updated. |
February 19, 2024 at 2:51 pm #15319169 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
2nd tier thinks you're right, but they can't reproduce the issue in the Sandbox. Could you maybe provide us a video so we can check if we're missing something? |
February 19, 2024 at 3:55 pm #15319471 | |
Verbal |
You guys had already properly created bookings (with reminders pending in 4 days). You'll see that they both trigger at the same time (video above) and then only the first email is sent (screenshot) |
February 19, 2024 at 5:08 pm #15319647 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Thanks, I'll let you have news as soon as possible. |
March 27, 2024 at 11:38 am #15455256 | |
Verbal |
Hello Laura, Could you update this? Is a patch planned? Regards, |
March 27, 2024 at 12:58 pm #15455708 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Hi, the issue is escalated to the developers but we don't have an ETA for it, I'm sorry. |
June 10, 2024 at 11:54 am #15721854 | |
Verbal |
Hello Laura, Four months after I sent a detailed bug report (along with a proposed fix (!)), it's still not patched. Could you follow-up with the dev team and give us an update? Regards, |
June 10, 2024 at 1:40 pm #15722255 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Unfortunately, fixing issues related to WooCommerce emails is not fixed, because the patch could create issues somewhere else, therefore it needs to be tested carefully - it's not trivial as it may seems. I see the issue is tentatively scheduled for WCML 5.5, but we can't guarantee an ETA. |