We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cfae11 commit d430ff6Copy full SHA for d430ff6
src/class-tiny-logger.php
@@ -103,14 +103,13 @@ public function get_log_file_path() {
103
/**
104
* Triggered when log_enabled is saved
105
* - set the setting on the instance
106
- * - if turn off, clear the logs
107
- * - if turned on, check if we can create the log file
+ * - if turn on, clear the old logs
108
*/
109
public static function on_save_log_enabled( $log_enabled, $old, $option ) {
110
$instance = self::get_instance();
111
$instance->log_enabled = 'on' === $log_enabled;
112
113
- if ( 'on' !== $log_enabled ) {
+ if ( $instance->get_log_enabled() ) {
114
$instance->clear_logs();
115
}
116
0 commit comments