[wp-trac] [WordPress Trac] #55946: `post_tag` is not supporting in rest api for custom meta

WordPress Trac noreply at wordpress.org
Wed Jun 8 07:41:59 UTC 2022


#55946: `post_tag` is not supporting in rest api for custom meta
--------------------------+-----------------------------
 Reporter:  kapilpaul     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  5.9.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hello,

 Recently I have encountered with this issue. I have registered a custom
 meta for `post_tag` and `category` taxonomy. and then I register in the
 rest api for this field. In rest api for `category` the custom meta key is
 showing where in the `post_tag` rest api it's not showing. I have added
 proper object types in the `register_rest_field`. In `Tags` rest api it is
 showing if I add the object type as `tag`. Which is pretty confusing.

 Reproduce Steps:
 1. Register Custom Meta for Category and Post Tag (You may add it through
 cmb2 or ACF)
 2. Enable the custom meta field in rest api.
 3. Update your terms on category and Tags.
 4. Check both the rest api endpoint with the ID/slug

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55946>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list