WC_Log_Handler_File::clear()
Clear entries from chosen file.
Метод класса: WC_Log_Handler_File{}
Хуки из метода
Возвращает
true|false
.
Использование
$WC_Log_Handler_File = new WC_Log_Handler_File(); $WC_Log_Handler_File->clear( $handle );
- $handle(строка) (обязательный)
- Log handle.
Код WC_Log_Handler_File::clear() WC Log Handler File::clear WC 8.7.0
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; }