mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 14:43:49 +09:00
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:
@@ -120,9 +120,9 @@ function um_send_registration_notification( $user_id ) {
|
||||
if ( ! empty( $emails ) ) {
|
||||
foreach ( $emails as $email ) {
|
||||
if ( 'pending' !== $registration_status ) {
|
||||
UM()->maybe_action_scheduler()->enqueue_async_action( 'um_dispatch_email', array( $email, 'notification_new_user', array( 'admin' => true ) ) );
|
||||
UM()->maybe_action_scheduler()->enqueue_async_action( 'um_dispatch_email', array( $email, 'notification_new_user', array( 'admin' => true, 'fetch_user_id' => $user_id ) ) );
|
||||
} else {
|
||||
UM()->maybe_action_scheduler()->enqueue_async_action( 'um_dispatch_email', array( $email, 'notification_review', array( 'admin' => true ) ) );
|
||||
UM()->maybe_action_scheduler()->enqueue_async_action( 'um_dispatch_email', array( $email, 'notification_review', array( 'admin' => true, 'fetch_user_id' => $user_id ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user