Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit 4b016e9

Browse files
authored
Merge pull request #30 from mageplaza/2.3-develop
2.3-develop
2 parents 9a0134c + 8874b2d commit 4b016e9

File tree

2 files changed

+30
-27
lines changed

2 files changed

+30
-27
lines changed

Model/MailEvent.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,18 @@ public function dispatch($message)
144144
if ($this->dataHelper->isEnabledAttachPdf($storeId)
145145
&& in_array($emailType, $this->dataHelper->getAttachPdf($storeId), true)) {
146146
$this->setPdfAttachment($emailType, $message, $obj, $attachmentPDF);
147+
$attachmentPDF = true;
147148
}
148149

149150
if ($this->dataHelper->getTacFile($storeId)
150151
&& in_array($emailType, $this->dataHelper->getAttachTac($storeId), true)) {
151152
$this->setTACAttachment($message, $storeId);
153+
$attachmentPDF = true;
152154
}
153155

154-
if ($this->dataHelper->versionCompare('2.2.9')) {
156+
if ($this->dataHelper->versionCompare('2.2.9') && $attachmentPDF) {
155157
$this->setBodyAttachment($message);
158+
$this->parts = [];
156159
}
157160

158161
foreach ($this->dataHelper->getCcTo($storeId) as $email) {

composer.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
{
2-
"name": "mageplaza/module-email-attachments",
3-
"description": "Magento 2 Email Attachments Extension",
4-
"require": {
5-
"mageplaza/module-core": "^1.4.5"
6-
},
7-
"type": "magento2-module",
8-
"version": "1.0.6",
9-
"license": "proprietary",
10-
"authors": [
11-
{
12-
"name": "Mageplaza",
13-
"email": "[email protected]",
14-
"homepage": "https://www.mageplaza.com",
15-
"role": "Technical Support"
16-
}
17-
],
18-
"autoload": {
19-
"files": [
20-
"registration.php"
21-
],
22-
"psr-4": {
23-
"Mageplaza\\EmailAttachments\\": ""
24-
}
25-
}
26-
}
1+
{
2+
"name": "mageplaza/module-email-attachments",
3+
"description": "Magento 2 Email Attachments Extension",
4+
"require": {
5+
"mageplaza/module-core": "^1.4.5"
6+
},
7+
"type": "magento2-module",
8+
"version": "1.0.7",
9+
"license": "proprietary",
10+
"authors": [
11+
{
12+
"name": "Mageplaza",
13+
"email": "[email protected]",
14+
"homepage": "https://www.mageplaza.com",
15+
"role": "Technical Support"
16+
}
17+
],
18+
"autoload": {
19+
"files": [
20+
"registration.php"
21+
],
22+
"psr-4": {
23+
"Mageplaza\\EmailAttachments\\": ""
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)