Automattic\WooCommerce\Internal\Admin\Schedulers
OrdersScheduler::get_orders_since
Get orders updated since the specified cursor position.
Uses a compound cursor (date + ID) to handle cases where multiple orders have the same timestamp. This ensures we can paginate through orders reliably even when batch_size < number of orders at the same timestamp.
Метод класса: OrdersScheduler{}
Хуков нет.
Возвращает
Массив. Array of objects with 'id' and 'date_updated_gmt' properties.
Использование
$result = OrdersScheduler::get_orders_since( $cursor_date, $cursor_id, $limit );
- $cursor_date(строка) (обязательный)
- Cursor date in
'Y-m-d H:i:s'format. - $cursor_id(int) (обязательный)
- Cursor order ID.
- $limit(int) (обязательный)
- Number of orders to retrieve.
Код OrdersScheduler::get_orders_since() OrdersScheduler::get orders since WC 10.8.1
private static function get_orders_since( $cursor_date, $cursor_id, $limit ) {
if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
return self::get_orders_since_from_orders_table( $cursor_date, $cursor_id, $limit );
} else {
return self::get_orders_since_from_posts_table( $cursor_date, $cursor_id, $limit );
}
}