Action_Scheduler\WP_CLI

Action_Command::run │ public │ WC 1.0

Run existing scheduled action(s).

OPTIONS

<id>...
One or more IDs of actions to run.
--- default: 0
---

EXAMPLES

# Run the action with id 100
$ wp action-scheduler action run 100
# Run the actions with ids 100 and 200
$ wp action-scheduler action run 100 200
# Run the first five pending actions in 'action-scheduler' group
$ wp action-scheduler action run $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids )

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

Хуков нет.

Возвращает

void. Ничего (null).

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

$Action_Command = new Action_Command();
$Action_Command->run( $args, $assoc_args );
$args(массив) (обязательный)
Positional arguments.
$assoc_args(массив) (обязательный)
Keyed arguments.

Код Action_Command::run() WC 11.2.2

public function run( array $args, array $assoc_args ) {
	require_once __DIR__ . '/Action/Run_Command.php';
	$command = new Action\Run_Command( $args, $assoc_args );
	$command->execute();
}