WordPress at Your Fingertips
function is not described

WC_Tracker::get_order_counts() private WC 1.0

Get order counts.

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

No Hooks.

Return

Array.

Usage

$result = WC_Tracker::get_order_counts();

Code of WC_Tracker::get_order_counts() WC 5.9.0

private static function get_order_counts() {
	$order_count      = array();
	$order_count_data = wp_count_posts( 'shop_order' );
	foreach ( wc_get_order_statuses() as $status_slug => $status_name ) {
		$order_count[ $status_slug ] = $order_count_data->{ $status_slug };
	}
	return $order_count;
}