forked from weDevsOfficial/wp-project-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.php
More file actions
20 lines (18 loc) · 684 Bytes
/
Copy pathuninstall.php
File metadata and controls
20 lines (18 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
* Uninstall cleanup.
*
* User data is intentionally preserved on uninstall — Google Workspace tokens,
* Drive attachments, settings, and all core Project Manager data survive a
* delete/reinstall. Only the scheduled cleanup cron is cleared, since a dangling
* schedule for removed code is not user data.
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
// Clear the scheduled cleanup cron only. No tables are dropped, no options deleted.
$timestamp = wp_next_scheduled( 'pm_google_workspace_cleanup' );
if ( $timestamp ) {
wp_unschedule_event( $timestamp, 'pm_google_workspace_cleanup' );
}
wp_clear_scheduled_hook( 'pm_google_workspace_cleanup' );