Affiliate Registration Notification Email Address

Posted in

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

9 Responses to Affiliate Registration Notification Email Address

  1. Jerry October 3, 2014 at 3:10 pm #

    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.

    • kento October 6, 2014 at 9:01 am #

      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.

  2. digitalfusion September 22, 2013 at 6:58 pm #

    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.

    • antonio September 23, 2013 at 6:48 am #

      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 );
      }
      }

      • Raymond September 23, 2013 at 4:09 pm #

        and where to put that piece of code?

        • antonio September 23, 2013 at 5:57 pm #

          Hi,
          you can put this code in your function.php theme file.

          • Raymond September 23, 2013 at 6:42 pm #

            and how do I call the function?

            • antonio September 24, 2013 at 6:15 am #

              The function is called automatically when a new affiliate is created.
              Remember to change “example@mydomain.com” to your email.

  3. antonio September 22, 2013 at 6:00 pm #

    Hi,
    in Affiliates->Notifications::Administrator Notification you can set the email.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share