Action_Scheduler\Migration

BatchFetcher::fetch()publicWC 1.0

Retrieve a list of actions.

Method of the class: BatchFetcher{}

No Hooks.

Return

Int[]. A list of action IDs

Usage

$BatchFetcher = new BatchFetcher();
$BatchFetcher->fetch( $count );
$count(int)
The number of actions to retrieve
Default: 10

BatchFetcher::fetch() code WC 7.3.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 [];
}