How can we stop new order confirmation email.

We have 3 payment methods which are EFT(Cash on Delivery), Paypal express checkout & Credit card payment. So when we place an order we get invoice and order confirmation email, so our requirement is something like we don't want order confirmation email if Paypal express checkout is used to order otherwise we want them so can't disable it from admin config and want some custom solution about it, any help will be appreciated, Thanks.


You can either create around plugin or preference for the "send" function available in this file


You can put your respective business logic in this function to restrict sending order confirmation emails in specific cases.

Hope this help you.



simply Override Magento\Sales\Model\Order\Email\Sender.php

 if($order->getPayment()->getMethodInstance()->getCode() != "yourpaymentmethodcode"){
 if($order->getPayment()->getMethodInstance()->getCode() != "yourpaymentmethodcode"){

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.