Automattic\WooCommerce\Internal\Admin\Schedulers

ImportScheduler::delete_batch()public staticWC 1.0

Delete a batch by passing the count to be deleted to the child delete method.

Method of the class: ImportScheduler{}

No Hooks.

Return

null. Nothing.

Usage

$result = ImportScheduler::delete_batch();

ImportScheduler::delete_batch() code WC 7.3.0

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 ) );
}