From bcd306ebd4cbf6ddc7465b010df4e6d697e04d34 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Mon, 14 Feb 2022 11:20:06 +0100 Subject: [PATCH] Authorize payment email could be send to guest user Always send the email to the order.email value --- app/mailers/payment_mailer.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/mailers/payment_mailer.rb b/app/mailers/payment_mailer.rb index 253d7b794a..b1ba77124f 100644 --- a/app/mailers/payment_mailer.rb +++ b/app/mailers/payment_mailer.rb @@ -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