-
Notifications
You must be signed in to change notification settings - Fork 846
replace is_active to determine available xmlrpc methods #19264
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
Conversation
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.
Here are some suggested test cases for this PR.
Connection
- In-place connection with free plan
- In-place connection with paid plan
- In-place connection with product purchase
- Classic connection. Use Safari, or set a constant
JETPACK_SHOULD_NOT_USE_CONNECTION_IFRAMEto true - Disconnect/reconnect connection
- Secondary user connection
- Connection on multisite
Verify that the changes are compatible with the plugins that use the connection package.
- WooCommerce Payments
- Jetpack Boost
- Previous versions of Jetpack
If you think that suggestions should be improved please edit the configuration file here. You can also modify/add test-suites to be used in the configuration file.
|
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 🤖 Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
fgiannar
left a comment
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.
Hey Leo!
Great work here! Thanks for providing a handy script to test with!
Code looks good, logic is solid I believe.
I've found a typo (see inline comments).
I'm having a bit of trouble testing with the provided script. I seem to get NULL for unauthorized requests to a non connected site.
I've tried it via Postman though and works as expected.
Co-authored-by: Foteini Giannaropoulou <[email protected]>
|
Updated the testing script with one that should work for all sites: 28d59-pb/#php (also updated in the PR description) |
fgiannar
left a comment
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.
Looks great, Leo! I tested using the provided instructions and everything works as expected! 💯
Stop using is_active to determine what XMLRPC endpoints should be available for the requests.
This is part of the cleanup to slowly deprecate the
is_activemethod and open the path to the user-less project.Changes proposed in this Pull Request:
Jetpack product discussion
1191179647901802-as-1200087466875449
Does this pull request change what data or activity we track or use?
No
Testing instructions:
In order to test this PR, there is this handy script -> 28d59-pb/#php
It will make 3 request to
system.listMethodsin your site. Save this script in your sandboxpublic_htmlfolder and edit it to add your test site ID.So the test flow is:
This will give you 3 outputs. Each output with the three types of request.
Look at the table here -> p9dueE-1Wm-p2
Make sure the exposed methods match the table. Each of the script runs will represent one column in the table.
Also, please read the code, follow the logic and check the criteria are not altered.
Finally, make sure the Jetpack Debugger passes all the tests and test the connection flows.
NOTE For the Debugger tests to pass you'll need #19301 and D59309-code (both deployed/merged already)