WC_Log_Handler_DB::clear
Clear entries for a chosen handle/source.
Method of the class: WC_Log_Handler_DB{}
No Hooks.
Returns
true|false.
Usage
$WC_Log_Handler_DB = new WC_Log_Handler_DB(); $WC_Log_Handler_DB->clear( $source );
- $source(string) (required)
- Log source.
WC_Log_Handler_DB::clear() WC Log Handler DB::clear code WC 10.6.2
public function clear( $source ) {
global $wpdb;
return $wpdb->query(
$wpdb->prepare(
"DELETE FROM {$wpdb->prefix}woocommerce_log WHERE source = %s",
$source
)
);
}