Authorize payment email could be send to guest user

Always send the email to the order.email value
This commit is contained in:
Jean-Baptiste Bellet
2022-02-14 11:20:06 +01:00
parent 6acd8a29f2
commit bcd306ebd4

View File

@@ -8,9 +8,7 @@ class PaymentMailer < Spree::BaseMailer
subject = I18n.t('spree.payment_mailer.authorize_payment.subject',
distributor: @payment.order.distributor.name)
I18n.with_locale valid_locale(@payment.order.user) do
mail(to: payment.order.user.email,
from: from_address,
subject: subject)
mail(to: payment.order.email, from: from_address, subject: subject)
end
end