WC_Order_Query::get_orders()publicWC 1.0

Get orders matching the current query vars.

Method of the class: WC_Order_Query{}

Return

Array|Object. of WC_Order objects

Usage

$WC_Order_Query = new WC_Order_Query();
$WC_Order_Query->get_orders();

WC_Order_Query::get_orders() code WC 9.4.2

public function get_orders() {
	$args    = apply_filters( 'woocommerce_order_query_args', $this->get_query_vars() );
	$results = WC_Data_Store::load( 'order' )->query( $args );
	return apply_filters( 'woocommerce_order_query', $results, $args );
}