Automattic\WooCommerce\Database\Migrations

TableMigrator::process_migration_batch_for_ids()publicWC 1.0

Устарела с версии 8.0.0. Больше не поддерживается и может быть удалена. Используйте `fetch_sanitized_migration_data` and `process_migration_data`.

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.

Список изменений

Устарела с 8.0.0 Use fetch_sanitized_migration_data and process_migration_data instead.

Код TableMigrator::process_migration_batch_for_ids() WC 8.7.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,
	);
}