Skip to content

Commit dfe2a28

Browse files
author
silinmykola
committed
33310 fix unsubscribe url in newsletter email template
1 parent ea236e7 commit dfe2a28

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/code/Magento/Newsletter/Model/Queue.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ public function sendPerSubscriber($count = 20)
253253

254254
/** @var \Magento\Newsletter\Model\Subscriber $item */
255255
foreach ($collection->getItems() as $item) {
256+
$item->setData('unsubscriptionLink', $item->getUnsubscriptionLink());
256257
$transport = $this->_transportBuilder->setTemplateOptions(
257258
['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $item->getStoreId()]
258259
)->setTemplateVars(

app/code/Magento/Newsletter/Model/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function getTemplateText()
224224
'template_text',
225225
__(
226226
'Follow this link to unsubscribe <!-- This tag is for unsubscribe link -->' .
227-
'<a href="{{var subscriber.getUnsubscriptionLink()}}">{{var subscriber.getUnsubscriptionLink()}}' .
227+
'<a href="{{var subscriber.unsubscriptionLink}}">{{var subscriber.unsubscriptionLink}}' .
228228
'</a>'
229229
)
230230
);

app/code/Magento/Newsletter/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Paused,Paused
9191
"You selected an invalid queue.","You selected an invalid queue."
9292
"We cannot mark as received subscriber.","We cannot mark as received subscriber."
9393
"Duplicate template code","Duplicate template code"
94-
"Follow this link to unsubscribe <!-- This tag is for unsubscribe link --><a href=""{{var subscriber.getUnsubscriptionLink()}}"">{{var subscriber.getUnsubscriptionLink()}}</a>","Follow this link to unsubscribe <!-- This tag is for unsubscribe link --><a href=""{{var subscriber.getUnsubscriptionLink()}}"">{{var subscriber.getUnsubscriptionLink()}}</a>"
94+
"Follow this link to unsubscribe <!-- This tag is for unsubscribe link --><a href=""{{var subscriber.unsubscriptionLink}}"">{{var subscriber.unsubscriptionLink}}</a>","Follow this link to unsubscribe <!-- This tag is for unsubscribe link --><a href=""{{var subscriber.unsubscriptionLink}}"">{{var subscriber.unsubscriptionLink}}</a>"
9595
"No such entity with %fieldName = %fieldValue","No such entity with %fieldName = %fieldValue"
9696
"Choose Store View:","Choose Store View:"
9797
"Newsletter Message Preview","Newsletter Message Preview"

0 commit comments

Comments
 (0)