Custom Fields
Support General MB Rest API Fields POST Method

  • Creator
  • #6451

    I am trying to use the WP Rest API to post data to fields that start with an _ and it appears to not allow posting to these fields. Do you know a workaround or a way to make it work with fields that start with an underscores that doesn't involve changing the meta key name?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #6452

    To clarify, the meta fields are showing properly when using a GET request to the endpoint, they just don't seem to update with an underscores. This was working a few months ago and i'm not sure what happened but it stopped working.

    Anh Tran

    Hi, POST works, actually.

    Here is the code that implements that.

    You can send data in json format (string) or an array in format (field_id => value).


    Interesting. The strange thing is this was all working previously and when I went to retest it wasn't working. Keep in mind the Meta Box fields that don't begin with an underscores are working properly. Only protected meta with an underscores that is setup as MB fields won't update but any of the others will just fine. I'll have to take a look and see if there is something else within WordPress that could have updated to cause this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.