Your cart is currently empty!
Affiliate Registration Notification Email Address
—
by
Is there a way to specify an email address for Affiliate Registration Notifications, rather than them going to the WordPress Site Admin?
In most cases, these should go to the WooCommerce notification address rather than the Site Admin.
Thanks,
Michael
Posted in Affiliates Pro
Comments
9 responses to “Affiliate Registration Notification Email Address”
Is it possible to send a notification when an affiliate’s referral upgrades to a premium subscription using s2member. For example, referrals on our site are free and an email is sent. I want to trigger another email when the referral becomes s2_member_level_2 by enrolling in our online class.
Hi Jerry, you have the option to notify when a referral is credited but for another notification on the upgrade there is no direct option that could be enabled on the back end. That would have to be done by adding an action when the upgrade happens.
That works for referral notifications, but Affiliate Registration notifications are still going to the WordPress admin email set in Settings->General.
Affiliate Registration notifications should also go to the email set in Affiliates->Notifications::Administrator Notification, no?
They don’t seem to be.
Sorry, I had misunderstood.
Right now, Affiliate registration notification is sent to admin email. But you can use “affiliates_added_affiliate” hook to send the notification to anothers emails, for example:
add_action( 'affiliates_added_affiliate', 'extra_email_affiliates_added_affiliate' );
function extra_email_affiliates_added_affiliate( $user_id ) {
$user = new WP_User( $user_id );
$user_login = stripslashes( $user->user_login );
$user_email = stripslashes( $user->user_email );
/* Here you new email */
$email = "example@mydomain.com";
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
$message = sprintf( __( 'New affiliate registration on your site %s:', AFFILIATES_PLUGIN_DOMAIN ), $blogname ) . "\r\n\r\n";
$message .= sprintf( __( 'Username: %s', AFFILIATES_PLUGIN_DOMAIN ), $user_login ) . "\r\n\r\n";
$message .= sprintf( __( 'E-mail: %s', AFFILIATES_PLUGIN_DOMAIN ), $user_email ) . "\r\n";
if ( get_option( 'aff_notify_admin', true ) ) {
@wp_mail( $email, sprintf( __( '[%s] New Affiliate Registration', AFFILIATES_PLUGIN_DOMAIN ), $blogname ), $message );
}
}
and where to put that piece of code?
Hi,
you can put this code in your function.php theme file.
and how do I call the function?
The function is called automatically when a new affiliate is created.
Remember to change “example@mydomain.com” to your email.
Hi,
in Affiliates->Notifications::Administrator Notification you can set the email.