Home › Forums › Plugin Support › Use with other plugin
- This topic has 2 replies, 2 voices, and was last updated 10 years, 9 months ago by enilline.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
February 20, 2014 at 6:42 pm #4873February 21, 2014 at 8:43 pm #4878KhaledMember
Hello,
By default, custom email only works with UMP forms. However, please add following code to your functions.php to hook custom email with user_register action.add_action( 'user_register', 'umpRegistrationEmail' ); function umpRegistrationEmail( $user_id ) { global $userMeta; $user = new WP_User( $user_id ); $key = 'registration'; $data = $userMeta->getEmailsData( $key ); $role = $userMeta->getUserRole( $user->ID ); if ( empty( $data['admin_email']['um_disable'] ) ) { $mailData = @$data['admin_email'][ $role ]; $mailData['email'] = !empty( $data['admin_email']['um_all_admin'] ) ? $userMeta->getAllAdminEmail() : get_bloginfo( 'admin_email' ); $mailData['email_type'] = $key; $mailData['receipt_type'] = 'admin'; $mailData = apply_filters( 'user_meta_raw_email', $mailData ); $mailData['subject'] = $userMeta->convertUserContent( $user, @$mailData['subject'] ); $mailData['body'] = $userMeta->convertUserContent( $user, @$mailData['body'] ); $userMeta->sendEmail( $mailData, $user ); } if ( empty( $data[ 'user_email' ][ 'um_disable' ] ) ) { $mailData = @$data['user_email'][ $role ]; $mailData['email'] = $user->user_email; $mailData['email_type'] = $key; $mailData['receipt_type'] = 'user'; $mailData = apply_filters( 'user_meta_raw_email', $mailData ); $mailData['subject'] = $userMeta->convertUserContent( $user, @$mailData['subject'] ); $mailData['body'] = $userMeta->convertUserContent( $user, @$mailData['body'] ); $userMeta->sendEmail( $mailData, $user ); } }
February 24, 2014 at 4:08 pm #4901enillineMemberThanks for your reply! I tried your suggestion, but it’s still not working. After adding this to the functions file, I didn’t receive any admin email after the user registered. The registered user got an email, but not as I had set it up with UMP, still just the default wordpress notification.
I made the form with the other plugin and I bought your plugin just to handle the email notifications. I have to make this work somehow, but not sure what to do? Please help me with some suggestions? Thanks!
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.