Skip to content

Commit

Permalink
Fix addon setting
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed May 8, 2024
1 parent 16eb414 commit 9e1bac2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/Installation/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ protected function get_upgrades(): array {
'1.14' => 'v114_upgrade',
'1.15' => 'v115_upgrade',
'1.20' => 'v120_upgrade',
'1.22' => 'v122_upgrade',
];

$current_version = \get_option( 'gtmkit_version' );
Expand Down Expand Up @@ -138,4 +139,18 @@ protected function v120_upgrade(): void {

Options::init()->set( $values, false, false );
}

/**
* Upgrade routine for v1.20
*/
protected function v122_upgrade(): void {

$values = [
'premium' => [
'addon_installed' => false,
],
];

Options::init()->set( $values, false, false );
}
}
2 changes: 1 addition & 1 deletion src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ final class Options {
],
'premium' => [
'addon_installed' => [
'default' => true,
'default' => false,
'type' => 'boolean',
],
],
Expand Down

0 comments on commit 9e1bac2

Please sign in to comment.