[wp-trac] [WordPress Trac] #50790: REST API: Allow sending empty array to remove all values for single = false meta

WordPress Trac noreply at wordpress.org
Sat Oct 24 05:57:39 UTC 2020


#50790: REST API: Allow sending empty array to remove all values for single = false
meta
----------------------------+-----------------------------
 Reporter:  chrisvanpatten  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  REST API        |     Version:  4.7
 Severity:  normal          |  Resolution:
 Keywords:  good-first-bug  |     Focuses:  rest-api
----------------------------+-----------------------------
Changes (by TimothyBlynJacobs):

 * keywords:   => good-first-bug
 * version:   => 4.7
 * milestone:  Awaiting Review => Future Release


Comment:

 @chrisvanpatten Do you want to work on a patch for this? We have a bit
 more time for inclusion in 5.6.

 I think the fix would be updating the `is_null()` clause in
 `WP_REST_Meta_Fields::update_value()` to a accept an empty array if the
 meta type is not `single`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50790#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list