@@ -2782,7 +2782,7 @@ module.exports = function (log, config, bounces, statsd) {
27822782 } ;
27832783
27842784 Mailer . prototype . subscriptionPaymentExpiredEmail = async function ( message ) {
2785- const { email, uid, planId , acceptLanguage, subscriptions } = message ;
2785+ const { email, uid, acceptLanguage, subscriptions } = message ;
27862786
27872787 const enabled = config . subscriptions . transactionalEmails . enabled ;
27882788 log . trace ( 'mailer.subscriptionPaymentExpired' , {
@@ -2817,7 +2817,7 @@ module.exports = function (log, config, bounces, statsd) {
28172817 }
28182818
28192819 const cmsLinks = await this . _generateCmsLinks (
2820- planId ,
2820+ subscriptions [ 0 ] ?. planId ,
28212821 acceptLanguage ,
28222822 template
28232823 ) ;
@@ -2841,7 +2841,7 @@ module.exports = function (log, config, bounces, statsd) {
28412841 Mailer . prototype . subscriptionPaymentProviderCancelledEmail = async function (
28422842 message
28432843 ) {
2844- const { email, uid, planId , acceptLanguage, subscriptions } = message ;
2844+ const { email, uid, acceptLanguage, subscriptions } = message ;
28452845
28462846 const enabled = config . subscriptions . transactionalEmails . enabled ;
28472847 log . trace ( 'mailer.subscriptionPaymentProviderCancelled' , {
@@ -2876,7 +2876,7 @@ module.exports = function (log, config, bounces, statsd) {
28762876 }
28772877
28782878 const cmsLinks = await this . _generateCmsLinks (
2879- planId ,
2879+ subscriptions [ 0 ] ?. planId ,
28802880 acceptLanguage ,
28812881 template
28822882 ) ;
@@ -3201,7 +3201,7 @@ module.exports = function (log, config, bounces, statsd) {
32013201 } ;
32023202
32033203 Mailer . prototype . subscriptionEndingReminderEmail = async function ( message ) {
3204- const { email, uid, planId , acceptLanguage, subscription } = message ;
3204+ const { email, uid, acceptLanguage, subscription } = message ;
32053205
32063206 const enabled = config . subscriptions . transactionalEmails . enabled ;
32073207 log . trace ( 'mailer.subscriptionEndingReminderEmail' , {
@@ -3227,7 +3227,7 @@ module.exports = function (log, config, bounces, statsd) {
32273227 template
32283228 ) ;
32293229 const cmsLinks = await this . _generateCmsLinks (
3230- planId ,
3230+ subscription . planId ,
32313231 acceptLanguage ,
32323232 template
32333233 ) ;
@@ -3280,7 +3280,7 @@ module.exports = function (log, config, bounces, statsd) {
32803280 } ;
32813281
32823282 Mailer . prototype . subscriptionRenewalReminderEmail = async function ( message ) {
3283- const { email, uid, planId , acceptLanguage, subscription } = message ;
3283+ const { email, uid, acceptLanguage, subscription } = message ;
32843284
32853285 const enabled = config . subscriptions . transactionalEmails . enabled ;
32863286 log . trace ( 'mailer.subscriptionRenewalReminderEmail' , {
@@ -3306,7 +3306,7 @@ module.exports = function (log, config, bounces, statsd) {
33063306 template
33073307 ) ;
33083308 const cmsLinks = await this . _generateCmsLinks (
3309- planId ,
3309+ subscription . planId ,
33103310 acceptLanguage ,
33113311 template
33123312 ) ;
0 commit comments