Automattic\WooCommerce\Internal\Admin\Orders
ListTable::count_orders_by_status()
Count orders by status.
{} Это метод класса: ListTable{}
Хуков нет.
Возвращает
int
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->count_orders_by_status( $status ): int;
- $status(строка) (обязательный)
- The order status we are interested in.
Код ListTable::count_orders_by_status() ListTable::count orders by status WC 6.8.0
private function count_orders_by_status( string $status ): int { $orders = wc_get_orders( array( 'limit' => -1, 'return' => 'ids', 'status' => $status, ) ); return count( $orders ); }