TableMigrator::process_migration_batch_for_ids()publicWC 1.0

Migrate a batch of orders, logging any database error that could arise and the exception thrown if any.

{} It's a method of the class: TableMigrator{}

No Hooks.


Array. An array containing the keys 'errors' (array of strings) and 'exception' (exception object or null).


$TableMigrator = new TableMigrator();
$TableMigrator->process_migration_batch_for_ids( $entity_ids ): array;
$entity_ids(array) (required)
Order ids to migrate.

Code of TableMigrator::process_migration_batch_for_ids() WC 7.1.0

public function process_migration_batch_for_ids( array $entity_ids ): array {
	$exception = null;

	try {
		$this->process_migration_batch_for_ids_core( $entity_ids );
	} catch ( \Exception $ex ) {
		$exception = $ex;

	return array(
		'errors'    => $this->get_errors(),
		'exception' => $exception,