MB Rest API Fields POST Method

Support General MB Rest API Fields POST Method

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6451
    alpha.mediaalpha.media
    Participant

    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?

    #6452
    alpha.mediaalpha.media
    Participant

    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.

    #6462
    Anh TranAnh Tran
    Keymaster

    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).

    #6463
    alpha.mediaalpha.media
    Participant

    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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.