[wp-trac] [WordPress Trac] #42600: Adding term with duplicate name via REST API no longer returning existing term ID

WordPress Trac noreply at wordpress.org
Fri Nov 17 13:47:12 UTC 2017


#42600: Adding term with duplicate name via REST API no longer returning existing
term ID
--------------------------+------------------------------
 Reporter:  shooper       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  4.9
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  rest-api
--------------------------+------------------------------

Comment (by shooper):

 I don't believe it's possible to have 100% backward compatibility with
 4.8.x as by changing the HTTP status code to 409, the data element in the
 response became an array instead of an integer.  What I suggest is adding
 'term_id' to the data array.

 Is there a way to change the status code without using the add_data()
 function?

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


More information about the wp-trac mailing list