diff --git a/lib/class-wp-rest-menus-controller.php b/lib/class-wp-rest-menus-controller.php index f7e6f36..807ac21 100644 --- a/lib/class-wp-rest-menus-controller.php +++ b/lib/class-wp-rest-menus-controller.php @@ -124,7 +124,7 @@ public function prepare_item_for_database( $request ) { $prepared_term = (array) $prepared_term; $schema = $this->get_item_schema(); if ( isset( $request['name'] ) && ! empty( $schema['properties']['name'] ) ) { - $response['menu-name'] = $request['name']; + $prepared_term['menu-name'] = $request['name']; } return $prepared_term;