Automattic\WooCommerce\Internal\DataStores\Orders
LegacyDataHandler::count_orders_for_cleanup
Returns the total number of orders for which legacy post data can be removed.
Метод класса: LegacyDataHandler{}
Хуков нет.
Возвращает
int. Number of orders.
Использование
$LegacyDataHandler = new LegacyDataHandler(); $LegacyDataHandler->count_orders_for_cleanup( $order_ids ): int;
- $order_ids(массив)
- If provided, total is computed only among IDs in this array, which can be either individual IDs or ranges like "100-200".
По умолчанию:array()
Код LegacyDataHandler::count_orders_for_cleanup() LegacyDataHandler::count orders for cleanup WC 10.9.4
public function count_orders_for_cleanup( $order_ids = array() ): int {
global $wpdb;
return (int) $wpdb->get_var( $this->build_sql_query_for_cleanup( $order_ids, 'count' ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- prepared in build_sql_query_for_cleanup().
}