From dbbc2d9cca3289884a68cfb6dc7d8d93255042f6 Mon Sep 17 00:00:00 2001 From: shin Date: Thu, 29 Oct 2020 15:09:26 +0700 Subject: [PATCH 1/2] =?UTF-8?q?L=E1=BB=97i=20content=20v=C3=A0=20attached?= =?UTF-8?q?=20file=20khi=20g=E1=BB=ADi=20email=20nhi=E1=BB=81u=20orders=20?= =?UTF-8?q?qua=20cron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/MailEvent.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Model/MailEvent.php b/Model/MailEvent.php index 61be9fb..7a06d2f 100644 --- a/Model/MailEvent.php +++ b/Model/MailEvent.php @@ -144,15 +144,18 @@ public function dispatch($message) if ($this->dataHelper->isEnabledAttachPdf($storeId) && in_array($emailType, $this->dataHelper->getAttachPdf($storeId), true)) { $this->setPdfAttachment($emailType, $message, $obj, $attachmentPDF); + $attachmentPDF = true; } if ($this->dataHelper->getTacFile($storeId) && in_array($emailType, $this->dataHelper->getAttachTac($storeId), true)) { $this->setTACAttachment($message, $storeId); + $attachmentPDF = true; } - if ($this->dataHelper->versionCompare('2.2.9')) { + if ($this->dataHelper->versionCompare('2.2.9') && $attachmentPDF) { $this->setBodyAttachment($message); + $this->parts = []; } foreach ($this->dataHelper->getCcTo($storeId) as $email) { From 8874b2d85bc2bb6747d0feab3158fd990be9e789 Mon Sep 17 00:00:00 2001 From: shin Date: Wed, 26 May 2021 10:58:20 +0700 Subject: [PATCH 2/2] update composer --- composer.json | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/composer.json b/composer.json index 52a411f..8b7a3fd 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,26 @@ -{ - "name": "mageplaza/module-email-attachments", - "description": "Magento 2 Email Attachments Extension", - "require": { - "mageplaza/module-core": "^1.4.5" - }, - "type": "magento2-module", - "version": "1.0.6", - "license": "proprietary", - "authors": [ - { - "name": "Mageplaza", - "email": "support@mageplaza.com", - "homepage": "https://www.mageplaza.com", - "role": "Technical Support" - } - ], - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Mageplaza\\EmailAttachments\\": "" - } - } -} +{ + "name": "mageplaza/module-email-attachments", + "description": "Magento 2 Email Attachments Extension", + "require": { + "mageplaza/module-core": "^1.4.5" + }, + "type": "magento2-module", + "version": "1.0.7", + "license": "proprietary", + "authors": [ + { + "name": "Mageplaza", + "email": "support@mageplaza.com", + "homepage": "https://www.mageplaza.com", + "role": "Technical Support" + } + ], + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Mageplaza\\EmailAttachments\\": "" + } + } +}