diff --git a/wp-rest/Controller/Rest.php b/wp-rest/Controller/Rest.php index 7f275d0..0aeb3df 100644 --- a/wp-rest/Controller/Rest.php +++ b/wp-rest/Controller/Rest.php @@ -152,8 +152,8 @@ public function get_formatted_api_params( $request ) { $args = $request->get_params(); - // destructure entity and action - [ 'entity' => $entity, 'action' => $action ] = $args; + $entity = $args['entity']; + $action = $args['action']; // unset unnecessary args unset( $args['entity'], $args['action'], $args['key'], $args['api_key'] );