• Resolved WTHeel

    (@wtheel)


    I created an email for “New User Registration – For User.” The test email works great, but when a user registers, according to Mandrill, the email is not sent at all.

    I’m 99.9% sure the conflict stems from another plugin I use to customize the login flow. It’s called “Personalize Login”. Here’s the plugin page: https://code.tutsplus.com/series/build-a-custom-wordpress-user-flow–cms-816

    Here’s the key plugin file: https://gist.github.com/anonymous/4518b142a9e686ad359c6fbcafa0a49c

    I would guess that register_user fires in this plugin (line 530) before the same function in BNFW. I’d imagine the same problem happens with other emails sent using this plugin, e.g. the password reset, but I’ve yet to test that. However, no email is sent at all, so I’m puzzled.

    The “Personalize Login” plugin only changes when I change it, i.e. there are no updates. As such, that’s where it makes sense to make changes. Any insight into what I should do there, to the plugin file linked above, to remove the conflict and utilize the BNFW custom emails?

    • This topic was modified 7 years, 9 months ago by WTHeel.
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author bnfw

    (@voltronik)

    Hi @wtheel,
    Thanks for your message.

    If you disable the Personalize Login plugin, does it fix the problem? If so, then I would go through each function, stop them from running and check to see if BNFW works each time. This will help you to narrow down the offending function(s).

    Let me know how you get on.

    Thanks,
    Jack

    Thread Starter WTHeel

    (@wtheel)

    Hi Jack,

    Yes, I went through all the steps. I disabled all the plugins except BNFW and changed the theme to the WP default. Once I added them all back except the Personalize Login plugin, BNFW still worked. When I re-activated Personalize Login, it fell apart. According to Mandrill, no email was sent out.

    I don’t think your methodology from the last post will work here. This plugin replaces the entire register/login/password-management flow.

    Here’s line 413:

    $result = $this->register_user( $email, $first_name, $last_name );

    This is where the registration process begins once the user has tried to register. The private function is at line 530, with this key line at 553:

    wp_new_user_notification( $user_id, $password );

    The BNFW plugin is supposed to override this function, but it looks like instead of doing that, it doesn’t and in the process stops Personalize Login from working — as when PL is activated and BNFW is not activated, an email sends.

    Thanks for your help!

    • This reply was modified 7 years, 9 months ago by WTHeel.
    Plugin Author bnfw

    (@voltronik)

    Hi @wtheel,
    Thanks for your message.

    BNFW overrides the default WordPress functionality but not necessarily the custom functionality of other plugins.

    Are you able to provide access to the full code for your plugin so that I can take a look and see if there’s an opportunity to make them compatible?

    Thanks,
    Jack

    Thread Starter WTHeel

    (@wtheel)

    The github link in my OP is actually the entire plugin except for templates, which do no processing. I don’t think you’d need more than that, but if you do, let me know.

    • This reply was modified 7 years, 9 months ago by WTHeel.
    Plugin Author bnfw

    (@voltronik)

    Hi @wtheel,
    Thanks for clarifying.

    I’ll take a look and let you know.

    Thanks,
    Jack

    Thread Starter WTHeel

    (@wtheel)

    Thanks. Let me know if you want me to upload the templates so you can install the plugin yourself.

    Thread Starter WTHeel

    (@wtheel)

    Any update?

    Plugin Author bnfw

    (@voltronik)

    Hi @wtheel,
    Not yet. I’m in the middle of other development so it’s something I’ll get around to but can’t guarantee it’ll be too immediately.

    I’ll let you know what I find though.

    Thanks,
    Jack

    Thread Starter WTHeel

    (@wtheel)

    Hey, just wanted to check in to see if you could help! Much appreciated.

    Thread Starter WTHeel

    (@wtheel)

    Hey @voltronik, just checking in. Thanks again for your help!

    Plugin Author bnfw

    (@voltronik)

    Hi @wtheel,
    No news yet but it’s on my to-do list. I can’t give a timeframe unfortunately.

    Thanks,
    Jack

    Plugin Author bnfw

    (@voltronik)

    Hi @wtheel,
    I’ve investigated this and unfortunately I just can’t provide support for a custom plugin. It would involve adding additional code to BNFW just to cater for that plugin and it’s just not economical in terms of development I’m afraid.

    Hope that makes sense.

    Thanks,
    Jack

    Thread Starter WTHeel

    (@wtheel)

    Thanks for looking into it, Jack.

    Thread Starter WTHeel

    (@wtheel)

    @voltronik and future readers:

    I dug into the code and managed to fix the problem. Unfortunately, I think it means I won’t be able to update your plugin if you update it, although the change was quite minor.

    In override.php (Line 49-51):

    if ( 'admin' === $notify || empty( $notify ) ) {
    				return;
    			}

    I commented out the return on Line 50 so that the function continued on.

    Moreover, in the other plugin, I changed

    wp_new_user_notification( $user_id , $password);

    to

    wp_new_user_notification( $user_id );

    Alone that didn’t fix it, but once I commented out the return it did.

    • This reply was modified 7 years, 8 months ago by WTHeel.
    Plugin Author bnfw

    (@voltronik)

    Hi @wtheel,
    Glad you got it working for you.

    Sounds like a fairly straight-forward fix to re-implement in the future should you wish to update. Alternatively, you may be able to script something to re-implement your fix after each update on your server.

    Thanks for sharing and if you like the plugin and the support, please feel free to leave an honest review.

    Thanks,
    Jack

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Registration Email Conflict’ is closed to new replies.