nal
*/
public static function delete_batch_init() {
global $wpdb;
$batch_size = static::get_batch_size( 'delete' );
$count = static::get_total_imported();
if ( 0 === $count ) {
return;
}
$num_batches = ceil( $count / $batch_size );
self::queue_batches( 1, $num_batches, 'delete_batch' );
}
/**
* Delete a batch by passing the count to be deleted to the child delete method.
*
* @internal
* @return void
*/
public static function delete_batch() {
wc_admin_record_tracks_event( 'delete_import_data_job_start', array( 'type' => static::$name ) );
$batch_size = static::get_batch_size( 'delete' );
static::delete( $batch_size );
ReportsCache::invalidate();
wc_admin_record_tracks_event( 'delete_import_data_job_complete', array( 'type' => static::$name ) );
}
}