Automattic\WooCommerce\Admin\Notes
OrderMilestones::get_orders_count() public WC 1.0
Get the total count of orders (in the allowed statuses).
{} Это метод класса: OrderMilestones{}
Хуков нет.
Возвращает
Число. Total orders count.
Использование
$OrderMilestones = new OrderMilestones(); $OrderMilestones->get_orders_count( $no_cache );
- $no_cache(true/false)
- Skip cache.
Код OrderMilestones::get_orders_count() OrderMilestones::get orders count WC 5.0.0
public function get_orders_count( $no_cache = false ) {
if ( $no_cache || is_null( $this->orders_count ) ) {
$status_counts = array_map( 'wc_orders_count', $this->allowed_statuses );
$this->orders_count = array_sum( $status_counts );
}
return $this->orders_count;
}