Skip to content

Commit 65983c4

Browse files
committed
For the boxes endpoint, remove cmb_id as array key to ensure an array response in JSON
1 parent e24a482 commit 65983c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/CMB2_REST_Controller_Boxes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function get_items( $request ) {
8888
foreach ( $boxes as $this->rest_box ) {
8989
if ( $this->rest_box->rest_read ) {
9090
$rest_box = $this->get_rest_box();
91-
$boxes_data[ $this->rest_box->cmb->cmb_id ] = $this->server->response_to_data( $rest_box, isset( $this->request['_embed'] ) );
91+
$boxes_data[] = $this->server->response_to_data( $rest_box, isset( $this->request['_embed'] ) );
9292
}
9393
}
9494

0 commit comments

Comments
 (0)