WC_Privacy::trash_orders_query()
For a given query trash all matches.
Метод класса: WC_Privacy{}
Хуков нет.
Возвращает
int
. Count of orders that were trashed.
Использование
$result = WC_Privacy::trash_orders_query( $query );
- $query(массив) (обязательный)
- Query array to pass to wc_get_orders().
Список изменений
С версии 3.4.0 | Введена. |
Код WC_Privacy::trash_orders_query() WC Privacy::trash orders query WC 9.5.1
protected static function trash_orders_query( $query ) { $orders = wc_get_orders( $query ); $count = 0; if ( $orders ) { foreach ( $orders as $order ) { $order->delete( false ); $count ++; } } return $count; }