WordPress at a glance
function is not described

WC_API_Orders::query_orders() private WC 2.1

Helper method to get order post objects

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

No Hooks.

Return

WP_Query.

Usage

// private - for code of main (parent) class only
$result = $this->query_orders( $args );
$args(array) (required)
request arguments for filtering query

Changelog

Since 2.1 Introduced.

Code of WC_API_Orders::query_orders() WC 5.0.0

<?php
private function query_orders( $args ) {

	// set base query arguments
	$query_args = array(
		'fields'      => 'ids',
		'post_type'   => 'shop_order',
		'post_status' => array_keys( wc_get_order_statuses() ),
	);

	// add status argument
	if ( ! empty( $args['status'] ) ) {

		$statuses                  = 'wc-' . str_replace( ',', ',wc-', $args['status'] );
		$statuses                  = explode( ',', $statuses );
		$query_args['post_status'] = $statuses;

		unset( $args['status'] );

	}

	$query_args = $this->merge_query_args( $query_args, $args );

	return new WP_Query( $query_args );
}