Fixes 'um_dispatch_email' action #1589

* Sending email notifications directly (without Action Scheduler) on user delete action;
* Changed activation handler priority for integration with Action Scheduler
* Added 'fetch_user_id' argument for fetching the necessary user before email sending when Action Scheduler is active.
This commit is contained in:
Mykyta Synelnikov
2024-11-19 17:48:10 +02:00
parent 1a11581d12
commit 8d33c43130
7 changed files with 59 additions and 19 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) {
add_action( 'init', array( &$this, 'check_for_querystrings' ), 1 );
add_action( 'init', array( &$this, 'activate_account_via_email_link' ), 1 );
// don't use lower than 2 priority because there is sending email inside, but Action Scheduler is init on 1st priority.
add_action( 'init', array( &$this, 'activate_account_via_email_link' ), 2 );
}
/**