I have a shop with multiple languages configured. I have customers with various locales. When I set sendReceipt to true, an email is sent with the receipt in the store’s default locale, not with the customer’s locale. Why is that?
From digging into this it sounds like if you want to send custom emails in the customer’s locale, you would need to disable sendReceipt and implement your own email sending logic, using the customer’s locale information from their account or order.
It appears that Shopify’s email notification templates are managed per store, not per customer - so the email notification system uses the store’s primary (default) language for transactional emails, regardless of the customer’s locale or the language they used during checkout.
Hi @Liam-Shopify! After investigating the issue more on my side, I’ve found that the main difference between:
- an order created with
orderCreate - and an order created with the default checkout from shopify
Is that the customer_locale property is set correctly (inferred from the Customer). I see no reason why that won’t be done by orderCreate when building the order, or even more, give us developers a property customer_locale to set that up.
Otherwise, the sendReceipt feature is pretty limited to straight up useless, don’t you think?
Hi @Liam-Shopify, any view from your side on this matter? Why isn’t customer_locale set appropriately based on the customer used? Or, why isn’t there a mutation that let’s us set that property?
As you noted the orderCreate mutation does not expose a customer_locale or similar property for you to set manually so the receipt email sent via sendReceipt: true uses the store’s default language, not the customer’s locale. It’s possible this is an intentional limitation of the API.
There is currently no supported way via the Admin API to set the order’s locale or force the receipt to be sent in the customer’s language - I can connect with the relevant team internally though and raise this as a feature request.
Would be great if this was added as an option in any mutation, or implicitly by using the customer’s locale. Thank you!