![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-sales/Model/Order/Email/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Sales\Model\Order\Email; use Magento\Sales\Model\Order; /** * Class NotifySender * phpcs:disable Magento2.Classes.AbstractApi * @api * @since 100.0.2 */ abstract class NotifySender extends Sender { /** * Send email to customer * * @param Order $order * @param bool $notify * @return bool */ protected function checkAndSend(Order $order, $notify = true) { $this->identityContainer->setStore($order->getStore()); if (!$this->identityContainer->isEnabled()) { return false; } $this->prepareTemplate($order); /** @var SenderBuilder $sender */ $sender = $this->getSender(); if ($notify) { $sender->send(); } elseif ($this->identityContainer->getCopyMethod() === 'copy') { // Email copies are sent as separated emails if their copy method // is 'copy' or a customer should not be notified $sender->sendCopyTo(); } return true; } }