avoid error when there are additional fields added by plugins #281

This commit is contained in:
leogermani 2019-07-31 14:28:01 -03:00 committed by Mateus Machado Luna
parent 8b56f6aacb
commit b075a1854a
1 changed files with 1 additions and 2 deletions

View File

@ -168,8 +168,7 @@ class REST_Taxonomies_Controller extends REST_Controller {
*/
public function prepare_item_for_database( $request ) {
foreach ($request as $key => $value){
$set_ = 'set_' . $key;
$this->taxonomy->$set_($value);
$this->taxonomy->set($key, $value);
}
}