Repository navigation
Conversation
Contributor
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Contributor
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Code Coverage SummaryCoverage changed in 1 file.
1 file is newly checked for coverage.
|
…or V2, shipped at 0%
…V2 kill switch is on
tx2pnw
force-pushed
the
add/wooptp-607-paypal-buttons-rollout
branch
from
November 19, 2026 22:54
0056673 to
6f7319b
Compare
tx2pnw
marked this pull request as ready for review
November 19, 2026 22:54
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of WOOPTP-607
Proposed changes
Add a percent rollout and a kill switch for PayPal Buttons V2 on WordPress.com, shipped at 0%, and stop gating live PayPal onboarding on the flag.
PERCENT. Every user on the site gets the same answer.PERCENTships at 0.PERCENTis 100.KILLEDconstant (Simple and Atomic) or a network option (Simple only) turns V2 off and beats the override. Ships off.platform_production_not_enabledwith "PayPal is temporarily unavailable. Please try again later." Sandbox stays open.At merge the onboarding change is the only one that goes live. V2 stays off on every site without a force-on override. Flag:
paypal-payments-api-managed-buttons.Why are these changes being made?
V2 has to go live on WordPress.com in steps and be switchable off fast. Today it is one off-by-default flag with no ramp and no off switch. The onboarding endpoints read that flag on the WordPress.com blog that serves the request, not the caller's site, so a ramp could never open them.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Details
Details
PERCENT > 0would check the wrong site for remote callers and would block the pilot and kill testing.rollout_default()ignores the incoming$enabledon purpose. That value is the package's registered default, so|| $enabledwould let a default flip turn V2 on for all of WordPress.com.PERCENTorKILLED. The tests set both through thewpcom_paypal_buttons_rollout_percent/wpcom_paypal_buttons_kill_switchfilters, the kill option or a subclass, so those PRs merge green.test_production_is_refused_until_the_flag_opens_itis nowtest_production_is_refused_only_while_killed.test_credentials_for_other_environment_are_rejectedandtest_production_environment_uses_live_hostopen production throughenable_production(), which turns the kill switch off.Testing instructions
Wpcom_PayPal_Buttons_Rollout_Testcovers the bucket, Atomic, override, kill and default-flip cases.WPCOM_REST_API_V2_Endpoint_PayPal_Onboarding_Testcovers the kill switch on all three onboarding routes.Load this branch on a Simple site (build
plugins/mu-wpcom-plugin). Inwp shell, on a site with no feature flag override:Without this PR the flag reads false all three times.
Onboarding: on a Jetpack-connected site, request a production signup link from
wp shell:KILLEDset totrue: 403platform_production_not_enabled, "PayPal is temporarily unavailable. Please try again later."'environment' => 'sandbox'andKILLEDset totrue: 200.