| 1 |
<?php |
| 2 |
/** |
| 3 |
* Fires when the user deletes the plugin from the Plugins screen. |
| 4 |
* Clears onboarding flags so a reinstall re-triggers the onboarding flow. |
| 5 |
* |
| 6 |
* @package Booktics |
| 7 |
*/ |
| 8 |
|
| 9 |
defined( 'WP_UNINSTALL_PLUGIN' ) || exit; |
| 10 |
|
| 11 |
$settings_key = 'booktics_options'; |
| 12 |
$settings = get_option( $settings_key, array() ); |
| 13 |
|
| 14 |
if ( is_array( $settings ) ) { |
| 15 |
unset( $settings['onboard_setup'] ); |
| 16 |
update_option( $settings_key, $settings ); |
| 17 |
} |
| 18 |
|
| 19 |
delete_option( 'booktics_is_installed' ); |
| 20 |
|