WC_Log_Handler_File::clear( string $handle )
Clear entries from chosen file.
Description Description
Parameters Parameters
- $handle
-
(Required) Log handle.
Return Return
(bool)
Source Source
File: includes/log-handlers/class-wc-log-handler-file.php
public function clear( $handle ) { $result = false; // Close the file if it's already open. $this->close( $handle ); /** * $this->open( $handle, 'w' ) == Open the file for writing only. Place the file pointer at * the beginning of the file, and truncate the file to zero length. */ if ( $this->open( $handle, 'w' ) && is_resource( $this->handles[ $handle ] ) ) { $result = true; } do_action( 'woocommerce_log_clear', $handle ); return $result; }