Automattic\WooCommerce\Database\Migrations

MetaToCustomTableMigrator::process_insert_batch()privateWC 1.0

Process batch for insertion into destination table.

Метод класса: MetaToCustomTableMigrator{}

Хуков нет.

Возвращает

null. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->process_insert_batch( $batch ): void;
$batch(массив) (обязательный)
Data to insert, will be of the form as returned by data in fetch_data_for_migration_for_ids.

Код MetaToCustomTableMigrator::process_insert_batch() WC 8.7.0

private function process_insert_batch( array $batch ): void {
	if ( 0 === count( $batch ) ) {
		return;
	}

	$queries = $this->generate_insert_sql_for_batch( $batch );
	// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Queries should already be prepared.
	$processed_rows_count = $this->db_query( $queries );
	$this->maybe_add_insert_or_update_error( 'insert', $processed_rows_count );
}