Skip to content

magento/magento2#39861: Shipment email not sent when submitted from Admin Order view despite being enabled in store configuration #39897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: 2.4-develop
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2015 Adobe
* All Rights Reserved.
*/

namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
Expand Down Expand Up @@ -167,7 +167,9 @@ public function execute()

$this->_saveShipment($shipment);

if (!empty($data['send_email']) && $this->salesData->canSendNewShipmentEmail()) {
// Pass the specific store ID from the order to check if shipment emails are enabled for that store
if (!empty($data['send_email'])
&& $this->salesData->canSendNewShipmentEmail($shipment->getOrder()->getStoreId())) {
$this->shipmentSender->send($shipment);
}

Expand Down