WordPress at a glance
function is not described

WC_REST_Order_Notes_V1_Controller::get_item() public WC 1.0

Get a single order note.

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

No Hooks.

Return

WP_Error|WP_REST_Response.

Usage

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

Code of WC_REST_Order_Notes_V1_Controller::get_item() WC 5.0.0

<?php
public function get_item( $request ) {
	$id    = (int) $request['id'];
	$order = wc_get_order( (int) $request['order_id'] );

	if ( ! $order || $this->post_type !== $order->get_type() ) {
		return new WP_Error( 'woocommerce_rest_order_invalid_id', __( 'Invalid order ID.', 'woocommerce' ), array( 'status' => 404 ) );
	}

	$note = get_comment( $id );

	if ( empty( $id ) || empty( $note ) || intval( $note->comment_post_ID ) !== intval( $order->get_id() ) ) {
		return new WP_Error( 'woocommerce_rest_invalid_id', __( 'Invalid resource ID.', 'woocommerce' ), array( 'status' => 404 ) );
	}

	$order_note = $this->prepare_item_for_response( $note, $request );
	$response   = rest_ensure_response( $order_note );

	return $response;
}