diff --git a/vendor/magento/module-product-alert/Model/Email.php b/vendor/magento/module-product-alert/Model/Email.php index 379ae29ef46..db20fa545fa 100644 --- a/vendor/magento/module-product-alert/Model/Email.php +++ b/vendor/magento/module-product-alert/Model/Email.php @@ -370,7 +370,7 @@ class Email extends AbstractModel $this->_appEmulation->stopEnvironmentEmulation(); $customerName = $this->_customerHelper->getCustomerName($this->_customer); - $this->_transportBuilder->setTemplateIdentifier( + $transport = $this->_transportBuilder->setTemplateIdentifier( $templateId )->setTemplateOptions( ['area' => Area::AREA_FRONTEND, 'store' => $storeId] @@ -389,8 +389,11 @@ class Email extends AbstractModel )->addTo( $this->_customer->getEmail(), $customerName - )->getTransport()->sendMessage(); + )->getTransport(); + $this->_appEmulation->startEnvironmentEmulation($storeId); + $transport->sendMessage(); + $this->_appEmulation->stopEnvironmentEmulation(); return true; }