Add user tracking endpoint proxy for tracks_opt_out#9142
Conversation
- Add endpoint proxy for D11180-code - Add `Jetpack::current_user_ip()` with `$check_all_headers` param. Depends on: #9122
|
Technically I have no problem with this, it builds nicely on the code that is already merged into Jetpack. What I'm concerned about is this: we are adding a new endpoint here, can't we instead use an existing |
|
EDIT I misunderstood the wpcom API endpoint vs the Jetpack site endpoints We would have preferred to use the existing
It's called |
|
@zinigor Thank you for the review, much appreciated :-)
I see what you mean about the Jetpack I used a separate endpoint out of concern for permissions. Currently, this endpoint is much more user-centric than In the case of a user not being connected to a WP.com account, we simply do not track them. That's a short-term solution. Having this separate endpoint affords us some leeway with respect to permissions -- in case a more long-term solution presents itself in the near future.
Good suggestion. How about |
|
Endpoint changed to |
zinigor
left a comment
There was a problem hiding this comment.
Thanks for changing the name, looks good to me!
Changes proposed in this Pull Request:
tracks_opt_out). Note that D11180-code has been merged already and is now live.Jetpack::current_user_ip()Testing instructions:
/jetpack/v4/tracking-settings(GET & POST methods).tracks_opt_outchanges when POSTing an update.