0
protected function checkAndSend(Order $order)
{
    $this->identityContainer->setStore($order->getStore());
    if (!$this->identityContainer->isEnabled()) {
        return false;
    }
    $this->prepareTemplate($order);

    /** @var SenderBuilder $sender */
    $sender = $this->getSender();

    try {
        $sender->send();
    } catch (\Exception $e) {
        $this->logger->error($e->getMessage());
        return false;
    }
    try {
        $sender->sendCopyTo();
    } catch (\Exception $e) {
        $this->logger->error($e->getMessage());
    }
    return true;
}

What is the use of this line of code $this->identityContainer->isEnabled() ?

1

enter image description here

We got Email identity from Store->Config->Sales->Sales Emails. Here we go the data for Identity.

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.