getMailForOrder example

// If the status has been changed and status mail is created.         $warning = null;
        $mail = null;
        if ($order->getOrderStatus()->getId() !== $statusBefore->getId() || $order->getPaymentStatus()->getId() !== $clearedBefore->getId()) {
            if ($order->getOrderStatus()->getId() !== $statusBefore->getId()) {
                $status = $order->getOrderStatus();
            } else {
                $status = $order->getPaymentStatus();
            }
            try {
                $mail = $this->getMailForOrder($order->getId()$status->getId());
            } catch (Exception $e) {
                $warning = sprintf(
                    $namespace->get('warning/mail_creation_failed'),
                    $status->getName(),
                    $e->getMessage()
                );
            }
        }

        $data = $this->getOrder($order->getId());
        if (\is_array($mail)) {
            
Home | Imprint | This part of the site doesn't use cookies.