WordPress at Your Fingertips
function is not described

WC_REST_Product_Reviews_Controller::get_item() public WC 1.0

Get a single product review.

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

No Hooks.

Return

WP_Error|WP_REST_Response.

Usage

$WC_REST_Product_Reviews_Controller = new WC_REST_Product_Reviews_Controller();
$WC_REST_Product_Reviews_Controller->get_item( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Code of WC_REST_Product_Reviews_Controller::get_item() WC 5.7.1

public function get_item( $request ) {
	$review = $this->get_review( $request['id'] );
	if ( is_wp_error( $review ) ) {
		return $review;
	}

	$data     = $this->prepare_item_for_response( $review, $request );
	$response = rest_ensure_response( $data );

	return $response;
}