WordPress at Your Fingertips
function is not described

WC_REST_Data_Currencies_Controller::prepare_item_for_response() public WC 1.0

Prepare the data object for response.

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

Return

WP_REST_Response. $response Response data.

Usage

$WC_REST_Data_Currencies_Controller = new WC_REST_Data_Currencies_Controller();
$WC_REST_Data_Currencies_Controller->prepare_item_for_response( $item, $request );
$item(object) (required)
Data object.
$request(WP_REST_Request) (required)
Request object.

Code of WC_REST_Data_Currencies_Controller::prepare_item_for_response() WC 5.5.2

<?php
public function prepare_item_for_response( $item, $request ) {
	$data     = $this->add_additional_fields_to_object( $item, $request );
	$data     = $this->filter_response_by_context( $data, 'view' );
	$response = rest_ensure_response( $data );

	$response->add_links( $this->prepare_links( $item ) );

	/**
	 * Filter currency returned from the API.
	 *
	 * @param WP_REST_Response $response The response object.
	 * @param array            $item     Currency data.
	 * @param WP_REST_Request  $request  Request used to generate the response.
	 */
	return apply_filters( 'woocommerce_rest_prepare_data_currency', $response, $item, $request );
}