diff --git a/Block/Adminhtml/AbandonedCart/Edit/Form.php b/Block/Adminhtml/AbandonedCart/Edit/Form.php
index c0fb0d2..ddc5a17 100644
--- a/Block/Adminhtml/AbandonedCart/Edit/Form.php
+++ b/Block/Adminhtml/AbandonedCart/Edit/Form.php
@@ -131,14 +131,14 @@ public function __construct(
GroupRepositoryInterface $groupRepository,
array $data = []
) {
- $this->addressConfig = $addressConfig;
- $this->priceCurrency = $priceCurrency;
- $this->emailIdentity = $emailIdentity;
- $this->emailTemplate = $emailTemplate;
- $this->taxConfig = $taxConfig;
+ $this->addressConfig = $addressConfig;
+ $this->priceCurrency = $priceCurrency;
+ $this->emailIdentity = $emailIdentity;
+ $this->emailTemplate = $emailTemplate;
+ $this->taxConfig = $taxConfig;
$this->logCollectionFactory = $logCollectionFactory;
$this->helperEmailMarketing = $helperEmailMarketing;
- $this->groupRepository = $groupRepository;
+ $this->groupRepository = $groupRepository;
parent::__construct($context, $registry, $formFactory, $data);
}
@@ -189,10 +189,10 @@ public function getHelperEmailMarketing()
*/
public function getSubtotal(Quote $quote, $inclTax = false)
{
- $address = $quote->isVirtual() ? $quote->getBillingAddress() : $quote->getShippingAddress();
+ $address = $quote->isVirtual() ? $quote->getBillingAddress() : $quote->getShippingAddress();
$subtotal = $inclTax ? $address->getSubtotalInclTax() : $address->getSubtotal();
- return $this->formatPrice($subtotal, $quote->getId());
+ return $this->formatPrice($subtotal, $quote->getStoreId());
}
/**
@@ -362,8 +362,8 @@ public function isSingleStoreMode()
public function getStoreName(Quote $quote)
{
$storeId = $quote->getStoreId();
- $store = $this->_storeManager->getStore($storeId);
- $name = [$store->getWebsite()->getName(), $store->getGroup()->getName(), $store->getName()];
+ $store = $this->_storeManager->getStore($storeId);
+ $name = [$store->getWebsite()->getName(), $store->getGroup()->getName(), $store->getName()];
return implode('
', $name);
}
diff --git a/Mail/Transport.php b/Mail/Transport.php
index e3a8761..837b301 100644
--- a/Mail/Transport.php
+++ b/Mail/Transport.php
@@ -97,58 +97,58 @@ public function __construct(
}
/**
+ * Around send message
+ *
* @param TransportInterface $subject
* @param Closure $proceed
*
* @throws MailException
* @throws Zend_Exception
*/
- public function aroundSendMessage(
- TransportInterface $subject,
- Closure $proceed
- ) {
+ public function aroundSendMessage(TransportInterface $subject, Closure $proceed)
+ {
$this->_storeId = $this->registry->registry('mp_smtp_store_id');
- $message = $this->getMessage($subject);
-
- if ($this->resourceMail->isModuleEnable($this->_storeId) && $message) {
- if ($this->helper->versionCompare('2.2.8')) {
- $message = Message::fromString($message->getRawMessage())->setEncoding('utf-8');
- }
+ if (!$this->resourceMail->isModuleEnable($this->_storeId)) {
+ $proceed();
- if (!$this->validateBlacklist($message)) {
- $message = $this->resourceMail->processMessage($message, $this->_storeId);
- $transport = $this->resourceMail->getTransport($this->_storeId);
- try {
- if (!$this->resourceMail->isDeveloperMode($this->_storeId)) {
- if ($this->helper->versionCompare('2.3.3')) {
- $message->getHeaders()->removeHeader("Content-Disposition");
- }
- $transport->send($message);
+ return;
+ }
+ $message = $this->getMessage($subject);
+ if ($this->helper->versionCompare('2.2.8')) {
+ $message = Message::fromString($message->getRawMessage())->setEncoding('utf-8');
+ }
+ if (!$this->validateBlacklist($message)) {
+ $message = $this->resourceMail->processMessage($message, $this->_storeId);
+ try {
+ if (!$this->resourceMail->isDeveloperMode($this->_storeId)) {
+ if ($this->helper->versionCompare('2.3.3')) {
+ $message->getHeaders()->removeHeader("Content-Disposition");
+ }
+ $transport = $this->resourceMail->getTransport($this->_storeId);
+ $transport->send($message);
- if ($this->helper->versionCompare('2.2.8')) {
- $messageTmp = $this->getMessage($subject);
- if ($messageTmp && is_object($messageTmp)) {
- $body = $messageTmp->getBody();
- if (is_object($body) && $body->isMultiPart()) {
- $message->setBody($body->getPartContent("0"));
- }
+ if ($this->helper->versionCompare('2.2.8')) {
+ $messageTmp = $this->getMessage($subject);
+ if ($messageTmp && is_object($messageTmp)) {
+ $body = $messageTmp->getBody();
+ if (is_object($body) && $body->isMultiPart()) {
+ $message->setBody($body->getPartContent("0"));
}
}
-
- $this->emailLog($message);
}
- } catch (Exception $e) {
- $this->emailLog($message, false);
- throw new MailException(new Phrase($e->getMessage()), $e);
}
+ $this->emailLog($message);
+ } catch (Exception $e) {
+ $this->emailLog($message, false);
+ throw new MailException(new Phrase($e->getMessage()), $e);
}
- } else {
- $proceed();
}
}
/**
- * @param $transport
+ * Get message
+ *
+ * @param TransportInterface $transport
*
* @return mixed|null
*/
diff --git a/composer.json b/composer.json
index 851cd51..2de2f04 100644
--- a/composer.json
+++ b/composer.json
@@ -2,10 +2,10 @@
"name": "mageplaza/module-smtp",
"description": "SMTP Extension for Magento 2 helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers",
"require": {
- "mageplaza/module-core": "^1.5.7"
+ "mageplaza/module-core": "^1.5.9"
},
"type": "magento2-module",
- "version": "4.7.13",
+ "version": "4.7.14",
"license": "proprietary",
"authors": [
{