cancel
Showing results for 
Search instead for 
Did you mean: 

How to get unsubscription link in emails (2.4.2)

How to get unsubscription link in emails (2.4.2)

Hello,

 

I am trying to get the unsubscription link in the email e.g. on order placement email etc. But I am unable to get the URL, So far I have tried several attributes as given below.

 

{{var subscriber.getUnsubscriptionLink()}}
{{var subscriber_data.getUnsubscriptionLink()}}
{{var subscriber_data.unsubscribe_link}}
{{var subscriber.unsubscribe_link}}

 

None of the above works for magento 2.4.2. Can anyone please guide me how to get this link

 

2 REPLIES 2

Re: How to get unsubscription link in emails (2.4.2)

 

In my Magento version I get the following code by default when creating a new newsletter template:

Follow this link to unsubscribe <!-- This tag is for unsubscribe link --><a href="{{var subscriber.getUnsubscriptionLink ()}}">{{var subscriber.getUnsubscriptionLink()}}</a>

I expect it to work in any Magento version.

Re: How to get unsubscription link in emails (2.4.2)

Hello @ngohang4891039 

 

Trust you are doing well,

 

Check out this link for precise solution https://magento.stackexchange.com/questions/172514/magento-2-how-to-include-unsubscribe-link-in-tran...

 

Hope this helps you,

Problem solved? Hit the Kudos button and "Accept it as Solution"