fix(esp-sync): sync non-donation subscription data even if no completed orders #3680
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.
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:
/my-account/add-payment-method
to add a new payment method.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.Other information: