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.

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

Хуков нет.

Возвращает

Строку.

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

$ActionScheduler_HybridStore = new ActionScheduler_HybridStore();
$ActionScheduler_HybridStore->find_action( $hook, $params );
$hook(строка) (обязательный)
-
$params(массив)
-
По умолчанию: []

Код ActionScheduler_HybridStore::find_action() 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 );
}