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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 -
- 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

Tagged: 

This topic contains 7 replies, has 3 voices.

Last updated by Nigel 6 months ago.

Assisted by: Nigel.

Author Posts
May 16, 2024 at 12:29 pm #15634977

Florencia-2

I use WooCommerce + WooCommerce Deposits

So, when a client purchases a product, they can pay in 2 instalments (for example, one now and the other one in 30 days)

What WooCommerce Deposits does, is create a pending order for the second instalment. So, for example, if my client buys a product today, 2 orders will be created:
1- one order today, with status 'Paid'
2- the second order is created automatically and the status is 'Programmed' with a date in the future (eg. 30 days from now)

When that second order is due, the website sends an email to the client letting them know about this second payment that is due.

The problem is: that email (for the second instalment) is NOT being sent in the language or the order.

For example: the client made the order in English, and the email regarding that first order was sent in English (which is correct). but the second email (the email for the second instalment) is sent in spanish

May 16, 2024 at 1:33 pm #15635424

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

As per our recent chat, please feel free to add your findings after reproducing the issue in the sandbox.

Regards.

May 20, 2024 at 7:47 am #15644030

Florencia-2

Hello. I used the sandbox you created in order to replicate the issue.

How the plugin works on a real website:
1. We create a payment plan (e.g. 2 monthly payments) and assign that payment plan to a product
2. when our client buys that product, they pay the first instalment and the website automatically creates an order for the second instalment. That order has a date in the future, and the status is "Scheduled".
3. When the date of the order arrives, the status automatically changes from "Scheduled" to "Pending deposit" (and that's when the email is sent to the client, requesting payment)

The problem is that, in the sandbox, the order remains as "Scheduled" (so, it doesn't automatically switch to "Pending deposit"). I guess it's because on the sandbox we are not using a valid license for the plugin WooCommerce Deposits. Because of that, I can't fully replicate the issue.
However, I created 3 orders in total. In 2 orders, I switched the status manually from "Scheduled" to "Pending deposit".

The original order was created in English. I noticed that if I go to my admin (where the default language is Spanish) and switch the order status from "Scheduled" to "Pending", that is done in Spanish (so the client would receive the email in Spanish, which is the problem).

As I mentioned before, this status switch happens automatically on the real website, but the issue is the same: when the status changes from "Scheduled" to "Pending deposit", it doesn't respect the language of the order.

What I would expect is that it would always respect the language of the order

May 21, 2024 at 10:02 am #15649493

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Hi there

Let me take over here and see if I can help.

I used the sandbox site, and from the front end I placed a deposit order from the English shop page.

That created an order, which as an admin in the back end I marked as completed (as if the bank transfer had been received).

From your description I was then expecting a new scheduled order to be created, which I could then manually update to pending deposit to trigger the email.

But no such order was created.

Have I misunderstood the steps? What am I missing?

May 21, 2024 at 10:08 am #15649517

Florencia-2

Hi Nigel, thank you for your message.
Please note that your scheduled order was created successfully (WooCommerce > Orders > At the top, filter by "scheduled", or in Spanish it's "programado")

Screenshot 2024-05-21 at 11.05.57.png
May 21, 2024 at 11:27 am #15650154

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Ah, I missed that, I'm not sure why the scheduled orders don't appear under all ('Todos').

So, I located and manually updated the order status to pending deposit ('Pago del depósito pendiente'), but that hasn't triggered an email notification.

(I added the plugin WP Mail Logging to log the sent emails, and it only recorded an email notification for the first order where the deposit was paid.)

Again, do you see something I'm missing?

May 28, 2024 at 8:31 am #15676771

Florencia-2

Hi. Thanks for your reply.

I triggered the email manually from the WooCommerce order. Unfortunately I wasn't able to replicate the issue.

I dug deeper into the issue we are having on the production site, and I noticed that the email subject and headline are in the correct language (English), but the rest of the email is in the wrong language (Spanish).

Please see the attached image. Since the email subject and headline and in the correct language, I guess the website is respecting the order language (English), but for some reason the email body is in Spanish.

When I mention the 'subject' and 'headline', I am referring to the elements in the attached image (I translated those elements using WPML)

Screenshot 2024-05-28 at 09.27.16.png
Screenshot 2024-05-28 at 09.26.44.png
Screenshot 2024-05-28 at 09.19.50.png
May 28, 2024 at 10:52 am #15677867

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

As it is not possible to reproduce the issue on the sandbox site it appears to require something specific to your site.

Do you have a staging server I can use for testing? I don't want to run tests on your production server, as that will include trying to identify the steps in a minimal install with only the necessary plugins active.

Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete.

Can you point me to a product that is set up with these deposits that I can use in testing?

The topic ‘[Closed] programmed orders are being created in the wrong language’ is closed to new replies.