WordPress at Your Fingertips
function is not described

WC_Background_Process::delete_all_batches() public WC 1.0

Delete all batches.

{} It's a method of the class: WC_Background_Process{}

No Hooks.

Return

WC_Background_Process.

Usage

$WC_Background_Process = new WC_Background_Process();
$WC_Background_Process->delete_all_batches();

Code of WC_Background_Process::delete_all_batches() WC 5.5.2

<?php
public function delete_all_batches() {
	global $wpdb;

	$table  = $wpdb->options;
	$column = 'option_name';

	if ( is_multisite() ) {
		$table  = $wpdb->sitemeta;
		$column = 'meta_key';
	}

	$key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';

	$wpdb->query( $wpdb->prepare( "DELETE FROM {$table} WHERE {$column} LIKE %s", $key ) ); // @codingStandardsIgnoreLine.

	return $this;
}