Skip to content

Commit 3a5197d

Browse files
authored
Merge pull request #19977 from mozilla/PAY-3494
fix(auth): Add in missing product logo to SubscriptionEndingReminder email
2 parents 0086917 + 8116f77 commit 3a5197d

6 files changed

Lines changed: 18 additions & 9 deletions

File tree

libs/shared/cms/src/__generated__/gql.ts

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/shared/cms/src/__generated__/graphql.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/shared/cms/src/lib/queries/page-content-by-price-ids/factories.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,14 @@ export const PageContentByPriceIdsOfferingResultFactory = (
5454
})
5555
),
5656
commonContent: {
57+
emailIcon: faker.internet.url(),
5758
supportUrl: faker.internet.url(),
58-
localizations: [{ supportUrl: faker.internet.url() }],
59+
localizations: [
60+
{
61+
emailIcon: faker.internet.url(),
62+
supportUrl: faker.internet.url(),
63+
},
64+
],
5965
},
6066
...override,
6167
});

libs/shared/cms/src/lib/queries/page-content-by-price-ids/query.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ export const pageContentByPriceIdsQuery = graphql(`
2424
stripeLegacyPlan
2525
}
2626
commonContent {
27+
emailIcon
2728
supportUrl
2829
localizations(filters: { locale: { eq: $locale } }) {
30+
emailIcon
2931
supportUrl
3032
}
3133
}

libs/shared/cms/src/lib/queries/page-content-by-price-ids/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
export interface PageContentByPriceIdsCommonContentResult {
6+
emailIcon: string;
67
supportUrl: string;
78
}
89

packages/fxa-auth-server/lib/payments/subscription-reminders.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ export class SubscriptionReminders {
225225
{
226226
uid,
227227
email,
228+
icon:
229+
purchase.offering.commonContent.localizations.at(0)?.emailIcon ||
230+
purchase.offering.commonContent.emailIcon,
228231
acceptLanguage: account.locale,
229232
subscription: formattedSubscription,
230233
reminderLength: this.reminderDuration.as('days'),
@@ -236,9 +239,6 @@ export class SubscriptionReminders {
236239
subscriptionSupportUrl:
237240
purchase.offering.commonContent.localizations.at(0)?.supportUrl ||
238241
purchase.offering.commonContent.supportUrl,
239-
productIconURLNew:
240-
purchase.purchaseDetails.localizations.at(0)?.webIcon ||
241-
purchase.purchaseDetails.webIcon,
242242
churnTermsUrl: new URL(
243243
`${this.paymentsNextUrl}/${offeringId}/${priceSubplatInterval}/stay_subscribed/loyalty-discount/terms`
244244
).toString(),

0 commit comments

Comments
 (0)