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

Action_Scheduler\WP_CLI

Migration_Command::init_logging() private WC 1.0

Hook command line logging into migration actions.

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

Хуков нет.

Возвращает

null. Ничего.

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

// private - только в коде основоного (родительского) класса
$result = $this->init_logging();

Код Migration_Command::init_logging() WC 5.8.0

private function init_logging() {
	add_action( 'action_scheduler/migrate_action_dry_run', function ( $action_id ) {
		WP_CLI::debug( sprintf( 'Dry-run: migrated action %d', $action_id ) );
	}, 10, 1 );
	add_action( 'action_scheduler/no_action_to_migrate', function ( $action_id ) {
		WP_CLI::debug( sprintf( 'No action found to migrate for ID %d', $action_id ) );
	}, 10, 1 );
	add_action( 'action_scheduler/migrate_action_failed', function ( $action_id ) {
		WP_CLI::warning( sprintf( 'Failed migrating action with ID %d', $action_id ) );
	}, 10, 1 );
	add_action( 'action_scheduler/migrate_action_incomplete', function ( $source_id, $destination_id ) {
		WP_CLI::warning( sprintf( 'Unable to remove source action with ID %d after migrating to new ID %d', $source_id, $destination_id ) );
	}, 10, 2 );
	add_action( 'action_scheduler/migrated_action', function ( $source_id, $destination_id ) {
		WP_CLI::debug( sprintf( 'Migrated source action with ID %d to new store with ID %d', $source_id, $destination_id ) );
	}, 10, 2 );
	add_action( 'action_scheduler/migration_batch_starting', function ( $batch ) {
		WP_CLI::debug( 'Beginning migration of batch: ' . print_r( $batch, true ) );
	}, 10, 1 );
	add_action( 'action_scheduler/migration_batch_complete', function ( $batch ) {
		WP_CLI::log( sprintf( 'Completed migration of %d actions', count( $batch ) ) );
	}, 10, 1 );
}