From a97e880222303b2c68e5dca2e8138c91fdd6c69f Mon Sep 17 00:00:00 2001 From: Olha Syzova Date: Mon, 23 Apr 2018 16:07:46 +0300 Subject: [PATCH] Duplicate Order Confirmation Emails for PayPal Express checkout order --- app/code/Magento/Paypal/Model/Express/Checkout.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Paypal/Model/Express/Checkout.php b/app/code/Magento/Paypal/Model/Express/Checkout.php index 649c653ef1a65..9c9b4dc3e87a7 100644 --- a/app/code/Magento/Paypal/Model/Express/Checkout.php +++ b/app/code/Magento/Paypal/Model/Express/Checkout.php @@ -809,7 +809,9 @@ public function place($token, $shippingMethodCode = null) case \Magento\Sales\Model\Order::STATE_PROCESSING: case \Magento\Sales\Model\Order::STATE_COMPLETE: case \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW: - $this->orderSender->send($order); + if (!$order->getEmailSent()) { + $this->orderSender->send($order); + } $this->_checkoutSession->start(); break; default: