WordPress at Your Fingertips
function is not described

WC_Log_Handler_DB::clear() public WC 1.0

Clear entries for a chosen handle/source.

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

No Hooks.

Return

true|false.

Usage

$WC_Log_Handler_DB = new WC_Log_Handler_DB();
$WC_Log_Handler_DB->clear( $source );
$source(string) (required)
Log source.

Code of WC_Log_Handler_DB::clear() WC 5.8.0

public function clear( $source ) {
	global $wpdb;

	return $wpdb->query(
		$wpdb->prepare(
			"DELETE FROM {$wpdb->prefix}woocommerce_log WHERE source = %s",
			$source
		)
	);
}