Action_Scheduler\Migration

BatchFetcher::fetch()publicWC 1.0

Retrieve a list of actions.

Метод класса: BatchFetcher{}

Хуков нет.

Возвращает

int[]. A list of action IDs

Использование

$BatchFetcher = new BatchFetcher();
$BatchFetcher->fetch( $count );
$count(int)
The number of actions to retrieve
По умолчанию: 10

Код BatchFetcher::fetch() WC 8.7.0

public function fetch( $count = 10 ) {
	foreach ( $this->get_query_strategies( $count ) as $query ) {
		$action_ids = $this->store->query_actions( $query );
		if ( ! empty( $action_ids ) ) {
			return $action_ids;
		}
	}

	return [];
}