Skip to content

Commit 1c9b006

Browse files
fix array key to get rid of undefined array key warning
1 parent 8cc6ac4 commit 1c9b006

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/class-notice-pro.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ private function get_setting(string $key)
2626
return $settings['notice_pro'][$key];
2727
}
2828

29-
private function update_setting(string $key, $value)
29+
private function update_setting(string $key, $value): void
3030
{
3131
$settings = $this->get_settings();
3232
$settings['notice_pro'][$key] = $value;
3333
update_option('koko_analytics_settings', $settings, true);
3434
}
3535

36-
public function maybe_show()
36+
public function maybe_show(): void
3737
{
3838
if (!current_user_can('manage_koko_analytics')) {
3939
return;
@@ -47,9 +47,9 @@ public function maybe_show()
4747
return;
4848
}
4949

50-
$date_installed = $this->get_setting('date_installed');
50+
$date_installed = $this->get_setting('timestamp_installed');
5151
if ($date_installed === null) {
52-
$this->update_setting('date_installed', time());
52+
$this->update_setting('timestamp_installed', time());
5353
return;
5454
}
5555

@@ -62,7 +62,6 @@ public function maybe_show()
6262
return;
6363
}
6464

65-
// SHOW NOTICE
6665
?>
6766
<style>
6867
.ka-notice {background: #fff8c5; border: 1px solid #d4a72c66; padding: 0 1em; margin: 1em 0; font-size: 14px;}

0 commit comments

Comments
 (0)