From cd7d5b38728c88e84cedace276b4aa416a8f8c12 Mon Sep 17 00:00:00 2001 From: spacedmonkey Date: Sun, 26 Jan 2020 21:27:42 +0000 Subject: [PATCH] Bug fix. --- lib/class-wp-rest-menus-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;