-
Notifications
You must be signed in to change notification settings - Fork 49
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
Stripe-to-Stripe Migrator #2032
Conversation
Just realized after opening this, I should probably add a check for existing Woo and Simplified Donate Block payments in Stripe, so we don't override those. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed two changes:
- e09d57d changes the methods to
static
, since they're called statically. As it was before the code errored out, perhaps because I ran it on PHP 8. - 0537941 adds
trial_end
, to avoid charging the customer twice. When a subscriptions is created, the customer is charged. Putting the subscription on trial period until next invoice seems like the only way to create a subscription without the initial charge.
Good catch! Thanks for fixing those. I switched to a different local environment recently, and clearly I need to make sure PHP notices are working correctly 🤔 I'll hold off on merging this until #1984 is merged, so I can resolve merge conflicts in this one |
🎉 This PR is included in version 1.92.0-alpha.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.92.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
This PR adds a Stripe-to-Stripe migrator which can migrate Stripe subscriptions (even Connect ones) to Newspack Simplified Donate Block Stripe subscriptions. We'll want to figure out how to merge this and #1984, because merge conflicts are gonna happen as soon as one of these is merged.
How to test the changes in this Pull Request:
wp newspack stripe sync-stripe-connect-to-stripe --dry-run
. You should see output similar to the following:wp newspack stripe sync-stripe-connect-to-stripe
. You should see output similar to the following:In Stripe, you should see the new subscriptions created with correct next renewal date:
In the cancelled subscriptions section, you should see the old ones cancelled:
wp newspack stripe sync-stripe-connect-to-stripe
again. You should see output similar to the following:wp newspack stripe sync-stripe-connect-to-stripe --force
. This will re-build all subscriptions, even migrated ones. You should see output similar to the following:Other information: