WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Action_Scheduler\WP_CLI

Migration_Command::register() public WC 1.0

Register the command with WP-CLI

{} Это метод класса: Migration_Command{}

Хуков нет.

Возвращает

null. Ничего.

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

$Migration_Command = new Migration_Command();
$Migration_Command->register();

Код Migration_Command::register() WC 5.8.0

public function register() {
	if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
		return;
	}

	WP_CLI::add_command( 'action-scheduler migrate', [ $this, 'migrate' ], [
		'shortdesc' => 'Migrates actions to the DB tables store',
		'synopsis'  => [
			[
				'type'        => 'assoc',
				'name'        => 'batch-size',
				'optional'    => true,
				'default'     => 100,
				'description' => 'The number of actions to process in each batch',
			],
			[
				'type'        => 'assoc',
				'name'        => 'free-memory-on',
				'optional'    => true,
				'default'     => 50,
				'description' => 'The number of actions to process between freeing memory. 0 disables freeing memory',
			],
			[
				'type'        => 'assoc',
				'name'        => 'pause',
				'optional'    => true,
				'default'     => 0,
				'description' => 'The number of seconds to pause when freeing memory',
			],
			[
				'type'        => 'flag',
				'name'        => 'dry-run',
				'optional'    => true,
				'description' => 'Reports on the actions that would have been migrated, but does not change any data',
			],
		],
	] );
}