Automattic\WooCommerce\Database\Migrations
MetaToCustomTableMigrator::process_insert_batch()
Process batch for insertion into destination table.
Method of the class: MetaToCustomTableMigrator{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->process_insert_batch( $batch ): void;
- $batch(array) (required)
- Data to insert, will be of the form as returned by data in fetch_data_for_migration_for_ids.
MetaToCustomTableMigrator::process_insert_batch() MetaToCustomTableMigrator::process insert batch code WC 9.7.1
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 ); }