mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Refactor deactivation logic to unschedule additional actions
Made the `deactivation` method public and added calls to unschedule specific actions related to email dispatch and account status checks. This ensures proper cleanup of scheduled tasks during plugin deactivation.
This commit is contained in:
@@ -370,16 +370,18 @@ if ( ! class_exists( 'UM' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Plugin Deactivation
|
||||
*
|
||||
* @since 2.3
|
||||
*/
|
||||
function deactivation() {
|
||||
public function deactivation() {
|
||||
$this->cron()->unschedule_events();
|
||||
}
|
||||
|
||||
$this->maybe_action_scheduler()->unschedule_all_actions( 'um_dispatch_email' );
|
||||
$this->maybe_action_scheduler()->unschedule_all_actions( 'um_schedule_empty_account_status_check' );
|
||||
$this->maybe_action_scheduler()->unschedule_all_actions( 'um_set_default_account_status' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Maybe need multisite activation process
|
||||
|
||||
Reference in New Issue
Block a user