Skip to content

Commit

Permalink
Remove constant import from uninstall script.
Browse files Browse the repository at this point in the history
  • Loading branch information
sheabunge committed Nov 11, 2023
1 parent c680c6f commit cb3ccb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Fixed: Error when attempting to download export files from Edit menu.
* Fixed: Issue loading Freemius string overrides too early. (PRO)
* Fixed: Fix redirect URL when connecting with OAuth on subdirectory or HTTPS sites. (PRO)
* Fixed: Import error when attempting to completely uninstall the plugin,

## 3.6.1 (07 Nov 2023)
* Fixed: Issue accessing fields on Snippets class.
Expand Down
6 changes: 2 additions & 4 deletions php/uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Code_Snippets\Uninstall;

use const Code_Snippets\Settings\OPTION_NAME;

/**
* Determine whether the option for allowing a complete uninstallation is enabled.
*
Expand All @@ -24,7 +22,7 @@ function complete_uninstall_enabled(): bool {
$unified = empty( $menu_perms['snippets_settings'] );
}

$settings = $unified ? get_site_option( OPTION_NAME ) : get_option( OPTION_NAME );
$settings = $unified ? get_site_option( 'code_snippets_settings' ) : get_option( 'code_snippets_settings' );

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

delete_option( 'code_snippets_version' );
delete_option( 'recently_activated_snippets' );
delete_option( OPTION_NAME );
delete_option( 'code_snippets_settings' );
}

/**
Expand Down

0 comments on commit cb3ccb4

Please sign in to comment.