Closed thefrosty closed 3 years ago
Thanks for the PR! To answer your question from the issue, the content-type must be set to JSON for it to be treated as JSON, by default we just treat it as regular post variables.
When I originally wrote this, though, WP_REST_Request::set_param
didn't have its logic updated to properly handle setting the value in the correct "slot". That got fixed in 4.8, so we could probably drop this method entirely and just call WP_REST_Request::set_param
directly.
Let me know which you prefer.
Yeah let's just call the Core method directly.
Thanks for the patch!
Fixes #5