Skip to content

Commit cb3ccb4

Browse files
committed
Remove constant import from uninstall script.
1 parent c680c6f commit cb3ccb4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Fixed: Error when attempting to download export files from Edit menu.
99
* Fixed: Issue loading Freemius string overrides too early. (PRO)
1010
* Fixed: Fix redirect URL when connecting with OAuth on subdirectory or HTTPS sites. (PRO)
11+
* Fixed: Import error when attempting to completely uninstall the plugin,
1112

1213
## 3.6.1 (07 Nov 2023)
1314
* Fixed: Issue accessing fields on Snippets class.

php/uninstall.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
namespace Code_Snippets\Uninstall;
1111

12-
use const Code_Snippets\Settings\OPTION_NAME;
13-
1412
/**
1513
* Determine whether the option for allowing a complete uninstallation is enabled.
1614
*
@@ -24,7 +22,7 @@ function complete_uninstall_enabled(): bool {
2422
$unified = empty( $menu_perms['snippets_settings'] );
2523
}
2624

27-
$settings = $unified ? get_site_option( OPTION_NAME ) : get_option( OPTION_NAME );
25+
$settings = $unified ? get_site_option( 'code_snippets_settings' ) : get_option( 'code_snippets_settings' );
2826

2927
return isset( $settings['general']['complete_uninstall'] ) && $settings['general']['complete_uninstall'];
3028
}
@@ -41,7 +39,7 @@ function uninstall_current_site() {
4139

4240
delete_option( 'code_snippets_version' );
4341
delete_option( 'recently_activated_snippets' );
44-
delete_option( OPTION_NAME );
42+
delete_option( 'code_snippets_settings' );
4543
}
4644

4745
/**

0 commit comments

Comments
 (0)