ActionScheduler_HybridStore::find_action()publicWC 1.0

Find the first matching action from the secondary store. If it exists, migrate it to the primary store immediately. After it migrates, the secondary store will logically contain the next matching action, so return the result thence.

Method of the class: ActionScheduler_HybridStore{}

No Hooks.

Return

String.

Usage

$ActionScheduler_HybridStore = new ActionScheduler_HybridStore();
$ActionScheduler_HybridStore->find_action( $hook, $params );
$hook(string) (required)
-
$params(array)
-
Default: []

ActionScheduler_HybridStore::find_action() code WC 8.7.0

public function find_action( $hook, $params = [] ) {
	$found_unmigrated_action = $this->secondary_store->find_action( $hook, $params );
	if ( ! empty( $found_unmigrated_action ) ) {
		$this->migrate( [ $found_unmigrated_action ] );
	}

	return $this->primary_store->find_action( $hook, $params );
}