WC_Log_Handler_DB::clear()
Clear entries for a chosen handle/source.
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.
WC_Log_Handler_DB::clear() WC Log Handler DB::clear code WC 9.2.3
public function clear( $source ) { global $wpdb; return $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_log WHERE source = %s", $source ) ); }