Skip to content

Commit

Permalink
Delete all settings when the plugin is uninstalled.
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev committed Nov 4, 2024
1 parent 7de54a1 commit 273b13c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions aspire-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ function aspire_update() {
new AspireUpdate\Controller();
}
}

register_activation_hook( __FILE__, 'aspire_update_activation_hook' );
function aspire_update_activation_hook() {
register_uninstall_hook( __FILE__, 'aspire_update_uninstall_hook' );
}

function aspire_update_uninstall_hook() {
$admin_settings = AspireUpdate\Admin_Settings::get_instance();
$admin_settings->delete_all_settings();
}

0 comments on commit 273b13c

Please sign in to comment.