Skip to content

Commit 5ac3b69

Browse files
committed
Updated Settings::saveSettings() to use OPTIONS_KEY constant.
1 parent 4cb6bc8 commit 5ac3b69

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Settings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,15 +512,15 @@ public function set(string $name, mixed $value): void
512512
*/
513513
public function saveSettings(array $settings): void
514514
{
515-
$option = get_option('rollbar_wp');
515+
$option = get_option(self::OPTIONS_KEY);
516516

517517
$option = array_merge($option, $settings);
518518

519519
foreach ($settings as $setting => $value) {
520520
$this->settings[$setting] = $value;
521521
}
522522

523-
update_option('rollbar_wp', $option);
523+
update_option(self::OPTIONS_KEY, $option);
524524
}
525525

526526
/**
@@ -689,8 +689,8 @@ public static function normalizeSettings(array $options): array
689689
$options = array_intersect_key($options, array_flip(self::listOptions()));
690690

691691
foreach (self::settings() as $key => $setting) {
692-
// 'access_token' and 'enabled' are different in WordPress plugin
693-
// look for 'server_side_access_token' and 'php_logging_enabled' above
692+
// 'access_token' and 'enabled' are different in the WordPress plugin look for 'server_side_access_token'
693+
// and 'php_logging_enabled' above.
694694
if (in_array($key, ['access_token', 'enabled'])) {
695695
continue;
696696
}

0 commit comments

Comments
 (0)