User getting “customer new account” email even if disabled

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #102722
    Andrea
    Participant

    Hi, I want to completely disable the “Customer new account” email sent by WooCommerce since I have a custom one sent by Mailchimp. I set the mail disabled in “WooCommerce > Emails”, but it keeps being sent. It seems that your plugin is the culprit. I tried various permutations of the plugin settings but none does what I need. The relevant current settings in “Email Verification > Email” are as follows:
    – Delay customer new account email enabled
    – Send verification email as a separate mail enabled
    – On “user register”
    What can I do?

    Thanks

    #102741
    Moshtafizur
    Participant

    Hello Andrea,

    I am really sorry to know you are experiencing problems.

    I couldn’t reproduce the issue on our end. Could you please ensure that in WooCommerce > Settings > Emails > New account, the Enable this email notification option is unchecked?

    Kind regards,
    Moshtafizur

    #103069
    Andrea
    Participant

    I can confirm the option is unchecked. What can I do?

    #103112
    Moshtafizur
    Participant

    Hello,

    Thanks for letting us know.

    Would it be possible for you to share your WordPress dashboard access so that we can check it for you? Then please send us your login credentials to [email protected].

    Kind regards,
    Moshtafizur

    #107010
    Andrea Baron
    Participant

    Hi Moshtafizur,

    I found the problem. It comes from a change introduced in version 2.4.3 of the plugin.
    In file includes/class-alg-wc-ev-emails.php on line 410 the function maybe_disable_customer_new_account_email does this:
    function maybe_disable_customer_new_account_email( $enable ) {
    $enable = $this->activate_customer_new_account_email;
    return $enable;
    }
    and completely ignores what comes from the $enable argument. So if the email is disabled from WooCommerce, and your plugin wants it enabled (it happens through the enable_customer_new_account_email function when the woocommerce_created_customer_notification hook is called) the new_account email becomes enabled anyway.

    The function should be written like this:
    function maybe_disable_customer_new_account_email( $enable ) {
    return $enable && $this->activate_customer_new_account_email;
    }
    now, if the user wants the email enabled ($enabled is true) and also the plugin ($this->activate_customer_new_account_email is true) then the mail gets sent but not in the other cases, so the user preference is now honoured.

    I hope you can release an update soon.

    Thanks!

    #107013
    Moshtafizur
    Participant

    Hello Andrea,

    Thanks for your reply.

    I have escalated this with our development team. They will get back to you as soon as they can.

    Kind regards,
    Moshtafizur

    #107068
    Pablo
    Moderator
    Plugin Support

    Thanks Andrea,

    I have updated the code as you suggested with some minor changes and it seems to be working just fine.

    Please, update the plugin to version 2.5.0 I just released and let me know if it helps 😉

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.