WC_Tracker::get_order_counts()private staticWC 1.0

Get order counts.

Method of the class: WC_Tracker{}

No Hooks.

Return

Array.

Usage

$result = WC_Tracker::get_order_counts();

WC_Tracker::get_order_counts() code WC 8.9.0

private static function get_order_counts() {
	$order_count = array();
	foreach ( wc_get_order_statuses() as $status_slug => $status_name ) {
		$order_count[ $status_slug ] = wc_orders_count( $status_slug );
	}
	return $order_count;
}