Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: apply ex-donor status only if user has no active subscriptions #2101

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Oct 31, 2022

All Submissions:

Changes proposed in this Pull Request:

Currently, if a reader cancels a recurring Stripe subscription, their donor status in the NP_Membership Status custom field is updated to "Ex-" donor. However, it's possible for readers to have multiple active recurring subscriptions, so cancelling one while keeping others active should not apply the "ex-donor" status. A contact should be considered an ex-donor only if they've canceled donations and have no currently active donations.

How to test the changes in this Pull Request:

  1. Check out this branch, set up RAS, and connect your site to an ActiveCampaign account.
  2. As a reader, make a recurring donation.
  3. Verify in the connected Stripe account that a subscription is created, and in the ActiveCampaign account that a contact is create with an NP_Membership Status like "Monthly Donor" depending on the frequency of the donation.
  4. Make a second recurring donation as the same reader with the same email address.
  5. In the Stripe dashboard, cancel one of the donations immediately.
  6. Confirm in the ActiveCampaign contact info that the NP_Current Subscription End Date is updated with the date of the cancellation, but that the NP_Membership Status value is still "Monthly Donor" (or matching the frequency of the most recently created recurring donation).
  7. In Stripe, cancel the other donation so that the reader has no remaining active recurring subscriptions.
  8. Confirm in the ActiveCampaign contact info that the NP_Current Subscription End Date is updated with the date of the latest cancellation, and that the NP_Membership Status value is now "Ex-Monthly Donor", since the contact has cancelled all known subscriptions.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added [Status] Needs Review The issue or pull request needs to be reviewed bug labels Oct 31, 2022
@dkoo dkoo requested a review from a team as a code owner October 31, 2022 22:30
@dkoo dkoo self-assigned this Oct 31, 2022
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Nov 1, 2022
@dkoo dkoo merged commit 40399ea into master Nov 1, 2022
@dkoo dkoo deleted the fix/apply-ex-status-if-no-subs branch November 1, 2022 14:17
matticbot pushed a commit that referenced this pull request Nov 3, 2022
# [1.96.0-alpha.1](v1.95.2...v1.96.0-alpha.1) (2022-11-03)

### Bug Fixes

* allow Stripe Billing portal to render without RAS ([b6e22cd](b6e22cd))
* apply ex-donor status only if user has no active subscriptions ([#2101](#2101)) ([40399ea](40399ea))
* apply My Account template changes only when RAS is active ([cd7b304](cd7b304))
* **stripe:** handle failed invoice fatal error ([#2103](#2103)) ([f865428](f865428))
* use default terms text in reg block if no text defined ([#2078](#2078)) ([443c59c](443c59c))

### Features

* enable setting user custom fields for job title etc. ([#2102](#2102)) ([4018af6](4018af6)), closes [#1723](#1723)
* **newsletter-contact:** disallow overriding membership status field ([#2093](#2093)) ([8b8e134](8b8e134))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.96.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Nov 14, 2022
# [1.96.0](v1.95.4...v1.96.0) (2022-11-14)

### Bug Fixes

* allow Stripe Billing portal to render without RAS ([b6e22cd](b6e22cd))
* apply ex-donor status only if user has no active subscriptions ([#2101](#2101)) ([40399ea](40399ea))
* apply My Account template changes only when RAS is active ([cd7b304](cd7b304))
* package lock ([8707e53](8707e53))
* **stripe:** handle failed invoice fatal error ([#2103](#2103)) ([f865428](f865428))
* **Stripe:** improve handling of invoice error ([#2117](#2117)) ([609bf7d](609bf7d))
* update newspack-scripts to fix CI builds ([#2109](#2109)) ([ec1ee7a](ec1ee7a))
* use default terms text in reg block if no text defined ([#2078](#2078)) ([443c59c](443c59c))

### Features

* enable setting user custom fields for job title etc. ([#2102](#2102)) ([4018af6](4018af6)), closes [#1723](#1723)
* **newsletter-contact:** disallow overriding membership status field ([#2093](#2093)) ([8b8e134](8b8e134))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.96.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants