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
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
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?
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")
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.)
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)
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.