Hi, I am using a payment gateway that records the orders as "Failed"when payment fails. However, the order confirmation email is still sent to the customer.
Is there any way to disable order notification email by order status? For Example- If the order status is "Processing", then only an email should be sent.
Or if the order status is "Failed", no email should be sent to the customer.