Fix incorrect laguage of order confirmation email for shop

The mail was sent in the customer's language, but it should be sent in the shop owner's language
This commit is contained in:
drummer83
2024-01-30 22:48:09 +01:00
parent 581627cd3f
commit d91b48a01b

View File

@@ -49,7 +49,7 @@ module Spree
def confirm_email_for_shop(order_or_order_id)
@order = find_order(order_or_order_id)
I18n.with_locale valid_locale(@order.user) do
I18n.with_locale valid_locale(@order.distributor.owner) do
subject = t('.subject',
number: @order.number,
distributor: @order.distributor.name)