MNTOR-4028: Allow renewing after receiving an expiration email #5587
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References:
Jira: MNTOR-4028
Figma:
Description
We email people that their subscription is about to expire, then mark them as having received the email. We check whether we have marked someone as having received the email when collecting the list of subscribers to email, which means that we shouldn't use that list when determining whether someone can renew.
I've updated it to use a similar check, but to skip the check for
churn_prevention_email_sent_at
.How to test
Create a
.csv
file with the following contents:Replace
18b8ea3c9b12427893ded71fda0cb8aa
with thefxa_uid
of the subscriber you want to email. (This subscriber should have Plus; you can give them Plus via/admin/dev
.) Then upload that file via/admin/churn-subscribers/
. It should say that there's one customer to email in the next cron run.Then, run that cron job through
npm run dev:cron:churn-discount
. The customer should receive an email.If you click the CTA in that email with
main
checked out, you should see "Your Monitor Plus subscription is still active", whereas on this branch, you should be able to renew successfully.Checklist (Definition of Done)