Automattic\WooCommerce\Internal\Admin\Schedulers

ImportScheduler::delete_batch_init()public staticWC 1.0

Queue item deletion in batches.

Method of the class: ImportScheduler{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = ImportScheduler::delete_batch_init();

ImportScheduler::delete_batch_init() code WC 9.4.2

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