Action_Scheduler\Migration
BatchFetcher::get_query_strategies()
Generate a list of prioritized of action search parameters.
Метод класса: BatchFetcher{}
Хуков нет.
Возвращает
Массив
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_query_strategies( $count );
- $count(int) (обязательный)
- Number of actions to find.
Код BatchFetcher::get_query_strategies() BatchFetcher::get query strategies WC 9.2.3
private function get_query_strategies( $count ) { $now = as_get_datetime_object(); $args = [ 'date' => $now, 'per_page' => $count, 'offset' => 0, 'orderby' => 'date', 'order' => 'ASC', ]; $priorities = [ Store::STATUS_PENDING, Store::STATUS_FAILED, Store::STATUS_CANCELED, Store::STATUS_COMPLETE, Store::STATUS_RUNNING, '', // any other unanticipated status ]; foreach ( $priorities as $status ) { yield wp_parse_args( [ 'status' => $status, 'date_compare' => '<=', ], $args ); yield wp_parse_args( [ 'status' => $status, 'date_compare' => '>=', ], $args ); } }