Automattic\WooCommerce\Database\Migrations

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.

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

Хуков нет.

Возвращает

Массив. 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(массив) (обязательный)
Order ids to migrate.

Код TableMigrator::process_migration_batch_for_ids() WC 6.8.0

public function process_migration_batch_for_ids( array $entity_ids ): array {
	$this->clear_errors();
	$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,
	);
}