Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Tracker::get_order_counts()
Get order counts.
Description Description
Return Return
(array)
Source Source
File: includes/class-wc-tracker.php
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; }