mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Updated registration email hooks to use maybe scheduler
This commit is contained in:
@@ -127,9 +127,9 @@ function um_send_registration_notification( $user_id ) {
|
||||
if ( ! empty( $emails ) ) {
|
||||
foreach ( $emails as $email ) {
|
||||
if ( 'pending' !== um_user( 'account_status' ) ) {
|
||||
UM()->mail()->send( $email, 'notification_new_user', array( 'admin' => true ) );
|
||||
UM()->maybe_action_scheduler()->enqueue_async_action( 'um_mas_send_email', array( $email, 'notification_new_user', array( 'admin' => true ) ) );
|
||||
} else {
|
||||
UM()->mail()->send( $email, 'notification_review', array( 'admin' => true ) );
|
||||
UM()->maybe_action_scheduler()->enqueue_async_action( 'um_mas_send_email', array( $email, 'notification_review', array( 'admin' => true ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user