ActionScheduler_HybridStore::find_actionpublicWC 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.

Returns

String.

Usage

$ActionScheduler_HybridStore = new ActionScheduler_HybridStore();
$ActionScheduler_HybridStore->find_action( $hook, $params );
$hook(string) (required)
Action's hook.
$params(array)
Action's arguments.
Default: array()

ActionScheduler_HybridStore::find_action() code WC 10.4.3

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

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