-
Notifications
You must be signed in to change notification settings - Fork 69
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
Adds environment metadata to Stripe Billing subscription and invoice payment intents #7190
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.41 MB ℹ️ View Unchanged
|
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.
- With Woo Subscriptions inactive
- With Woo Subscriptions active
- Subscription Renewals with Woo Subscriptions active and inactive
- Confirmed subscription_context is "stripe_billing" when plugin active
- Confirmed "legacy_wcpay_subscription" when deactivated
- With Woo Subscriptions and Stripe Billing disabled, confirmed "regular_subscription" payment context on parent and renewal order charges
Code changes look good and tests all went well alongside the changes on server. Happy to approve this!
Fixes #6529
Changes proposed in this Pull Request
This PR adds 2 pieces of meta data to Stripe Billing objects:
Subscription metadata
Rationale
When a store has the Woo Subscriptions plugin active and a Stripe Billing subscription is created they must have had Stripe Billing enabled at the time. If the plugin isn't active and they are still creating Stripe Billing subscriptions. Then they are still using WCPay Subscriptions. This meta data can be used to identify how many merchants are actively using Stripe Billing subscriptions, or still using WCPay Subscriptions.
Payment intent metadata
Rationale
When we receive a webhook for a Stripe Billing renewal order (paid of failed), we want to know under what context this payment is being processed. Have they actively opted into Stripe Billing, are still using WCPay subscriptions, or have installed Woo Subscriptions but haven't migrated their subscriptions.
Testing instructions
add/support_for_subscription_and_invoice_meta
server branch for these changes to work correctly.Subscriptions
With Woo Subscriptions inactive
wcpay_subscriptions
meta.With Woo Subscriptions active
woo_subscription
meta.Subscription Renewals
Subscription updated
description.subscription_context
stripe_billing
) is added.Subscription updated
description.subscription_context
legacy_wcpay_subscription
) is added.Subscription updated
description.subscription_context
legacy_wcpay_subscription
) is added.npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge