Automattic\WooCommerce\Admin\API

Notes::prepare_note_data_for_response()publicWC 1.0

Prepare note data.

Method of the class: Notes{}

No Hooks.

Return

WP_REST_Response. $response Response data.

Usage

$Notes = new Notes();
$Notes->prepare_note_data_for_response( $note, $request );
$note(Note) (required)
Note data.
$request(WP_REST_Request) (required)
Request object.

Notes::prepare_note_data_for_response() code WC 7.3.0

public function prepare_note_data_for_response( $note, $request ) {
	$note = $note->get_data();
	$note = $this->prepare_item_for_response( $note, $request );
	return $this->prepare_response_for_collection( $note );
}