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(esp-sync): sync non-donation subscription data even if no completed orders #3680

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Jan 16, 2025

All Submissions:

Changes proposed in this Pull Request:

Currently, for purposes of ESP contact syncing, a reader's "current product" can only be an active subscription or an inactive subscription with at least one completed order. This latter criteria is so that readers with donations that only have failed payments can't be considered "Ex-Donors", as they've never completed a donation. However, for non-donation subscriptions, we simply sync the subscription status, so it's more beneficial to sync data about these subscriptions whether or not they had any completed orders. This is especially important for sites with migrated subscriptions, most of which won't have any completed orders.

How to test the changes in this Pull Request:

  1. Register a new reader account, then log into My Account and go to /my-account/add-payment-method to add a new payment method.
  2. Add the "Decline after attaching" test card number: 4000000000000341 and save. This can be saved as a payment method without being declined up-front, but will be declined when attempting to use it to complete a transaction.
  3. While still logged in as this reader, purchase a donation subscription (it will fail at the payment step—this is okay, the subscription will still be created in on-hold status, which is what we want).
  4. In the connected ESP, inspect the synced contact data and confirm that no product data was synced (Product Name, Membership Status, Subscription Start/End/Last Payment/Next Payment Date fields).
  5. While still logged in as this reader, purchase a NON-donation subscription.
  6. In the connected ESP, inspect the synced contact data and confirm that the non-donation subscription product data was synced.

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 the [Status] Needs Review The issue or pull request needs to be reviewed label Jan 16, 2025
@dkoo dkoo self-assigned this Jan 16, 2025
@dkoo dkoo requested a review from a team as a code owner January 16, 2025 19:10
@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 Jan 17, 2025
@dkoo dkoo merged commit dd0898f into release Jan 17, 2025
10 checks passed
@dkoo dkoo deleted the hotfix/sync-non-donation-subs-without-orders branch January 17, 2025 17:29
matticbot pushed a commit that referenced this pull request Jan 17, 2025
## [5.11.3](v5.11.2...v5.11.3) (2025-01-17)

### Bug Fixes

* **esp-sync:** sync non-donation subscription data even if no completed orders ([#3680](#3680)) ([dd0898f](dd0898f))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.11.3 🎉

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
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