@@ -2800,7 +2800,7 @@ module.exports = function (log, config, bounces, statsd) {
28002800 } ;
28012801
28022802 Mailer . prototype . subscriptionPaymentExpiredEmail = async function ( message ) {
2803- const { email, uid, planId , acceptLanguage, subscriptions } = message ;
2803+ const { email, uid, acceptLanguage, subscriptions } = message ;
28042804
28052805 const enabled = config . subscriptions . transactionalEmails . enabled ;
28062806 log . trace ( 'mailer.subscriptionPaymentExpired' , {
@@ -2835,7 +2835,7 @@ module.exports = function (log, config, bounces, statsd) {
28352835 }
28362836
28372837 const cmsLinks = await this . _generateCmsLinks (
2838- planId ,
2838+ subscriptions [ 0 ] ?. planId ,
28392839 acceptLanguage ,
28402840 template
28412841 ) ;
@@ -2859,7 +2859,7 @@ module.exports = function (log, config, bounces, statsd) {
28592859 Mailer . prototype . subscriptionPaymentProviderCancelledEmail = async function (
28602860 message
28612861 ) {
2862- const { email, uid, planId , acceptLanguage, subscriptions } = message ;
2862+ const { email, uid, acceptLanguage, subscriptions } = message ;
28632863
28642864 const enabled = config . subscriptions . transactionalEmails . enabled ;
28652865 log . trace ( 'mailer.subscriptionPaymentProviderCancelled' , {
@@ -2894,7 +2894,7 @@ module.exports = function (log, config, bounces, statsd) {
28942894 }
28952895
28962896 const cmsLinks = await this . _generateCmsLinks (
2897- planId ,
2897+ subscriptions [ 0 ] ?. planId ,
28982898 acceptLanguage ,
28992899 template
29002900 ) ;
@@ -3219,7 +3219,7 @@ module.exports = function (log, config, bounces, statsd) {
32193219 } ;
32203220
32213221 Mailer . prototype . subscriptionEndingReminderEmail = async function ( message ) {
3222- const { email, uid, planId , acceptLanguage, subscription } = message ;
3222+ const { email, uid, acceptLanguage, subscription } = message ;
32233223
32243224 const enabled = config . subscriptions . transactionalEmails . enabled ;
32253225 log . trace ( 'mailer.subscriptionEndingReminderEmail' , {
@@ -3245,7 +3245,7 @@ module.exports = function (log, config, bounces, statsd) {
32453245 template
32463246 ) ;
32473247 const cmsLinks = await this . _generateCmsLinks (
3248- planId ,
3248+ subscription . planId ,
32493249 acceptLanguage ,
32503250 template
32513251 ) ;
@@ -3298,7 +3298,7 @@ module.exports = function (log, config, bounces, statsd) {
32983298 } ;
32993299
33003300 Mailer . prototype . subscriptionRenewalReminderEmail = async function ( message ) {
3301- const { email, uid, planId , acceptLanguage, subscription } = message ;
3301+ const { email, uid, acceptLanguage, subscription } = message ;
33023302
33033303 const enabled = config . subscriptions . transactionalEmails . enabled ;
33043304 log . trace ( 'mailer.subscriptionRenewalReminderEmail' , {
@@ -3324,7 +3324,7 @@ module.exports = function (log, config, bounces, statsd) {
33243324 template
33253325 ) ;
33263326 const cmsLinks = await this . _generateCmsLinks (
3327- planId ,
3327+ subscription . planId ,
33283328 acceptLanguage ,
33293329 template
33303330 ) ;
0 commit comments