WordPress at Your Fingertips
function is not described

WC_REST_System_Status_V2_Controller::prepare_item_for_response() public WC 1.0

Prepare the system status response

{} It's a method of the class: WC_REST_System_Status_V2_Controller{}




$WC_REST_System_Status_V2_Controller = new WC_REST_System_Status_V2_Controller();
$WC_REST_System_Status_V2_Controller->prepare_item_for_response( $system_status, $request );
$system_status(array) (required)
System status data.
$request(WP_REST_Request) (required)
Request object.

Code of WC_REST_System_Status_V2_Controller::prepare_item_for_response() WC 5.9.0

public function prepare_item_for_response( $system_status, $request ) {
	$data = $this->add_additional_fields_to_object( $system_status, $request );
	$data = $this->filter_response_by_context( $data, 'view' );

	$response = rest_ensure_response( $data );

	 * Filter the system status returned from the REST API.
	 * @param WP_REST_Response   $response The response object.
	 * @param mixed              $system_status System status
	 * @param WP_REST_Request    $request  Request object.
	return apply_filters( 'woocommerce_rest_prepare_system_status', $response, $system_status, $request );