WC_Logger::clearpublicWC 1.0

Clear entries for a chosen file/source.

Method of the class: WC_Logger{}

No Hooks.

Returns

true|false.

Usage

$WC_Logger = new WC_Logger();
$WC_Logger->clear( $source, $quiet );
$source(string)
Source/handle to clear.
Default: ''
$quiet(true|false)
Whether to suppress the deletion message.
Default: false

WC_Logger::clear() code WC 10.8.1

public function clear( $source = '', $quiet = false ) {
	if ( ! $source ) {
		return false;
	}

	foreach ( $this->get_handlers() as $handler ) {
		if ( $handler instanceof WC_Log_Handler && is_callable( array( $handler, 'clear' ) ) ) {
			$handler->clear( $source, $quiet );
		}
	}

	return true;
}