WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin\API

Notes::get_items() public WC 1.0

Get all notes.

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

No Hooks.

Return

WP_REST_Response.

Usage

$Notes = new Notes();
$Notes->get_items( $request );
$request(WP_REST_Request) (required)
Request data.

Code of Notes::get_items() WC 6.1.0

public function get_items( $request ) {
	$query_args = $this->prepare_objects_query( $request );

	$notes = NotesRepository::get_notes( 'edit', $query_args );

	$is_tasklist_experiment_assigned_treatment = $this->is_tasklist_experiment_assigned_treatment();

	$data = array();
	foreach ( (array) $notes as $note_obj ) {
		// Hide selected notes for users not in experiment.
		if ( ! $is_tasklist_experiment_assigned_treatment ) {
			if ( 'wc-admin-complete-store-details' === $note_obj['name'] ) {
				continue;
			}

			if ( 'wc-admin-update-store-details' === $note_obj['name'] ) {
				continue;
			}
		}
		$note   = $this->prepare_item_for_response( $note_obj, $request );
		$note   = $this->prepare_response_for_collection( $note );
		$data[] = $note;
	}

	$response = rest_ensure_response( $data );
	$response->header( 'X-WP-Total', count( $data ) );

	return $response;
}