From 439be5d7ed2203bf5e721a5b95a71b7e2a63a8c8 Mon Sep 17 00:00:00 2001 From: Jonny Harris Date: Tue, 11 Feb 2020 11:51:18 +0000 Subject: [PATCH] Change error name. Co-Authored-By: Timothy Jacobs --- 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 fe15788..d78c5c6 100644 --- a/lib/class-wp-rest-menus-controller.php +++ b/lib/class-wp-rest-menus-controller.php @@ -440,7 +440,7 @@ protected function handle_locations( $menu_id, $request ) { $new_locations = array(); foreach ( $request['locations'] as $location ) { if ( ! in_array( $location, $menu_locations, true ) ) { - return new WP_Error( 'check_assign_locations_permission', __( 'Menu location does not exist.' ), array( 'status' => 400 ) ); + return new WP_Error( 'invalid_menu_location', __( 'Menu location does not exist.' ), array( 'status' => 400 ) ); } $new_locations[ $location ] = $menu_id; }