WP-API / wp-api-meta-endpoints

Legacy Feature plugin for Meta Endpoints. Use register_post_meta & register_meta with `'show_in_rest' => true` instead.
https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/#working-with-registered-meta-in-the-rest-api
38 stars 15 forks source link

Multiple meta key/value pairs #13

Open mjacobsen4DFM opened 8 years ago

mjacobsen4DFM commented 8 years ago

To avoid multiple posts, is there any way to send multiple meta key/value pairs through the endpoint? I expect something like this to work: [ { "key":"test_key", "value":"test value here" }, { "key":"test_key2", "value":"test2 value here" } ]

No joy. I get "Missing parameter(s): key" Is my JSON malformed for the request, or is it even possible?

SamBenson commented 7 years ago

Did you get any luck with this? Having the same issue...

jrevillini commented 7 years ago

Same here. Based on https://developer.wordpress.org/rest-api/reference/users/#create-a-user I believed that I could pass a json object of key/value pairs into the meta argument, but it yielded no saved usermeta in the database as of today with WP 4.8.2.