| @@ -157,12 +157,15 @@ | ||
| 157 | 157 | |
| 158 | 158 | if ( $this->is_enabled_auto_archive_logs() && ! empty( $this->settings->options['records_logs_ttl'] ) ) { |
| 159 | 159 | add_action( 'mainwp_module_log_cron_job_auto_archive', array( $this, 'cron_module_log_auto_archive' ) ); |
| 160 | 160 | } |
| 161 | - if ( ! empty( $this->settings->options['enabled'] ) ) { | |
| 162 | - add_action( 'mainwp_module_log_render_db_size_notice', array( $this->admin, 'render_logs_db_notice' ), 10, 1 ); | |
| 161 | + | |
| 162 | + if ( $this->admin instanceof Log_Admin ) { | |
| 163 | + if ( ! empty( $this->settings->options['enabled'] ) ) { | |
| 164 | + add_action( 'mainwp_module_log_render_db_size_notice', array( $this->admin, 'render_logs_db_notice' ), 10, 2 ); | |
| 165 | + } | |
| 166 | + add_action( 'mainwp_module_log_render_db_update_notice', array( $this->admin, 'render_update_db_notice' ), 10, 1 ); | |
| 163 | 167 | } |
| 164 | - add_action( 'mainwp_module_log_render_db_update_notice', array( $this->admin, 'render_update_db_notice' ), 10, 1 ); | |
| 165 | 168 | } |
| 166 | 169 | |
| 167 | 170 | |
| 168 | 171 | /** |