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
Heartbeat: Improve xmlrpc request argument handling #10074
Conversation
That's a great PR description, thank you so much for your effort! Generated by 🚫 dangerJS |
not quite sure if introducing the handler method is necessary or even tidier than just checking in |
I haven't tested it, but I agree with your approach as it future-proofs us better IMO than keeping it within |
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 - tested via the debugger and ran a test using the wp jetpack get-heartbeat
command in wpcom.
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.
I wonder what all this was breaking on the WP.com side.
Looks good to me.
* Add handler of xmlrpc request for heartbeat data wrapping generate_stats_array call
Ported to |
Fixes #10070
Props to @kraftbj for finding the source of the issue.
The proposal here is based on a personal opinion that using
generate_stats_array
was being overloaded in usage as both a direct xmlrpc method handler and a statically callable method for other purposes.Changes proposed in this Pull Request:
Jetpack_Heartbeat:: xmlrpc_data_response
method as handler for the XML RPC requestjetpack.getHeartbeatData
.Testing instructions:
WP_DEBUG
WP_DEBUG_LOG
constants set to true.Proposed changelog entry for your changes: