Remove extra loop
This commit is contained in:
parent
64f09329dd
commit
7eded142c7
|
@ -74,13 +74,7 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
|
||||||
$schema = $this->get_item_schema();
|
$schema = $this->get_item_schema();
|
||||||
$fields = $this->get_fields_for_response( $request );
|
$fields = $this->get_fields_for_response( $request );
|
||||||
$mappings = $this->get_item_mappings( $fields );
|
$mappings = $this->get_item_mappings( $fields );
|
||||||
$response = array();
|
$response = $this->prepare_item_for_response( $mappings, $request );
|
||||||
|
|
||||||
foreach ( $mappings as $section => $values ) {
|
|
||||||
$response[ $section ] = $values;
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = $this->prepare_item_for_response( $response, $request );
|
|
||||||
|
|
||||||
return rest_ensure_response( $response );
|
return rest_ensure_response( $response );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue