-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Add experiment functionality to the WooCommerce → Subscriptions page #32958
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
Add experiment functionality to the WooCommerce → Subscriptions page #32958
Conversation
|
Hey @aprea. I'm testing the Get started -> Create product flow and after creating a product I'm not getting the modal popup request to complete the KYC. The product is saved as a draft, the Have you had this occur by any chance? There don't appear to be any JS errors either. Btw I'm testing on https://courageous-warbler.jurassic.ninja/, let me know if you want creds. |
|
I just replicated on a fresh JN site without this experiment flow so it's not likely to be related to this PR in any case. |
|
Thanks @james-allan, I was also able to reproduce this on my JN site 😢 Seems like a regression in WCPay. I'm looking into it now. |
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.
LGTM @aprea!
I was able to get Abacus bookmarklets working in a local wp-env site and I can confirm that this code is reading the experiment audience cookie correctly.
I haven't tested the complete control flow, as completing onboarding relies on WCPay PR #4255 being released. I think it is safe to merge this PR into the feature branch since the remainder of the flow is handled by WCPay and is not affected by these changes.
Testing steps completed:
- Create
wp-envsite on PR branch - Make store eligible for experiment
- Subscriptions menu item appears with ‘new’ badge
- Clicking Subscriptions initially took me to the Control flow
Control
- Event
wcadmin_wccore_subscriptions_empty_state_viewfired. - Observe the Treatment A headers.
- Click Get started.
- Event
wcadmin_wccore_subscriptions_empty_state_get_started_clickfired. - WCPay installed.
- Create a new subscription product page.
- Event
- Click publish.
- It saves a draft and the expected modal doesn’t appear.
⚠️ - Issue with WCPay, fix in progress → WCPay PR #4255.
- It saves a draft and the expected modal doesn’t appear.
Treatment
- Event
wcadmin_wccore_subscriptions_empty_state_viewfired. - Observe the Treatment B headers.
- Click Get Started.
- Event
wcadmin_wccore_subscriptions_empty_state_get_started_clickfired. - WCPay installed.
- Event
- Complete Stripe Onboarding in Test mode.
- Redirected to WooCommerce → Subscriptions.
|
Hi @aprea, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
All Submissions:
Changes proposed in this Pull Request:
Internal project: pdjTHR-Vi-p2
This PR adds code to:
woocommerce_wcpay_subscriptions_page_202207_v1experiment.Additionally, each treatment has its own set of steps in the "You’re only steps away from selling subscriptions" section. These steps should accurately reflect their respective flow described above.
How to test the changes in this Pull Request:
Note: Because this PR requires interacting with ExPlat/Abacus it's much easier to test this PR in an environment that communicates with the production WPCOM servers. As such, these instructions are written specifically for testing on Jurassic Ninja or another non-local environment.
You can grab a zip of this PR for testing here: woocommerce.zip
update_option( 'woocommerce_admin_install_timestamp', strtotime( '-6 month' ) );'woocommerce-wcpay-subscriptions_recent_sales_eligibility'transient if this criteria failed previously.Testing the treatments
Download, install and activate the WooCommerce Admin Test Helper plugin.
Navigate to Tools → WCA Test Helper → Experiments. This page should contain a row for the "woocommerce_wcpay_subscriptions_page_202207_v1" experiment.
Here you can toggle between the control (treatment A) and the treatment (treatment B).
Treatment A
Treatment B
Other information:
pnpm nx changelog <project>?FOR PR REVIEWER ONLY: