Issue with Admin Notification

Posted in

I originally had the same issue as mentioned here and was able to fix the re-direction of the admin email with the code you specifiy. However, none of the usernames and emails are correct in the notification itself. For instance, I registered a new affiliate with:

username: affiliatetest4
password: wakins
email: dorys@dspdesignworks.com

but the admin email says:

username: ms_monique_turner
email: ms_monique_turner@yahoo.com

the code seems to be pulling a random user already registered on the site.

I’ve tested more than once and the same thing happens… different username and password each time.
password:

8 Responses to Issue with Admin Notification

  1. Patrick November 16, 2015 at 4:06 pm #

    Here is a screen shot of how I have this configured. Please let me know what is incorrect

    http://grab.by/M2qQ

    • antonio November 16, 2015 at 4:43 pm #

      Hi,
      Affiliates registration uses the blog admin email. You can set it in Settings->General:Email Address.
      If you need to use other email, you can use ‘affiliates_admin_email’ filter.
      Kind Regards

  2. Patrick November 16, 2015 at 4:02 pm #

    The email is already set correctly in the Affiliates->Notifications section. I have it set to the shop manager but the new registration email DOES NOT go to the shop manage…. it goes to the site admin. It even says on the page in that section

    “Notifications on referral status updates are only sent when the status changes from pending to accepted.”

    I need the new registration email to go to the shop manager with the correct username and password. Why is it so difficult for you to understand my request?

  3. Patrick November 11, 2015 at 5:01 pm #

    I don’t think you are understanding my issue. I am already using the “send from” plugin to change the FROM address.

    However, I ALSO need to change the TO address. Your plugin currently sends to the site admin email, however, I need to send the email to the store manager. If the code above does not work, then how do I change to TO address.

    The “send from” plugin DOES NOT CHANGE the TO address!

    • antonio November 12, 2015 at 6:57 am #

      Hi Patrick,
      sorry, I had misunderstood. In Affiliates->Notifications you can set the TO address in “Administrator notifications”
      Kind Regards,
      Antonio B.

  4. Patrick November 10, 2015 at 8:30 pm #

    Thank you for your quick response but your answer is a bit vague. I changed the $user_id to $affiliate_id on lines 2 & 3 of the code and but it still is pulling in an already registered user, not the new registration.

    Is there any other code that needs to be changed? Here is what I have:

    add_action( 'affiliates_added_affiliate', 'extra_email_affiliates_added_affiliate' );
    function extra_email_affiliates_added_affiliate( $affiliate_id ) {
    $user = new WP_User( $affiliate_id );
    $user_login = stripslashes( $user->user_login );
    $user_email = stripslashes( $user->user_email );
    /* Here you new email */
    $email = "dorys@onewebcompany.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 I’m already using the send from script but that doesn’t change the “send to” that I need from the above code.

    • antonio November 11, 2015 at 11:02 am #

      Sorry Patrick,
      this is not the solution. I have indicated only the new function call.
      I recommend using the plugin instead of code.
      Kind Regards,
      Antonio B.

  5. antonio November 10, 2015 at 6:59 am #

    Hi Patrick,
    this code is not compatible with the current version. In the actual version, the parameter is not $user_id, it’s the $affiliate_id
    Maybe Send From plugin can help you.
    Kind Regards,
    Antonio B.

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