• Hello WordPressers.

    When a new user registers an account using the woocommerce login page the user receives an email – however the admin account does not.

    The admin account receives an email when adding a user manually in the dashboard, and all other notifications are working, such as order processing and payment confirmation.

    Could there a problem with my setup or is this not a feature available ‘out of the box’?

    Any suggestions on how to implement this would be greatly appreciated.

    Regards.
    B.

    https://www.ads-software.com/extend/plugins/woocommerce/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor James Koster

    (@jameskoster)

    I don’t think WordPress ever sends the admin an email when a new user registers?

    Thread Starter qwid

    (@qwid)

    It does.
    https://codex.www.ads-software.com/Function_Reference/wp_new_user_notification

    Dashboard > Settings> General > Email Address, This address is used for admin purposes, like new user notification.

    @toto I used your code from the above link in my function.php file but I am having a glitch. I am getting the email when a new customer registers, but the User Name and Email Address in the email is blank, so I do not know who the new customer is. This is important, because I have some clients from my irl store that I need to transfer their loyalty points to their online account. Is there something I missed?

    The code I copied is:

    // Woocommerce New Customer Admin Notification Email
    add_action(‘woocommerce_created_customer’, ‘admin_email_on_registration’);
    function admin_email_on_registration() {
    $user_id = get_current_user_id();
    wp_new_user_notification( $user_id );
    }

    Any help would be great. Thanks!

    @toto I am having the same problem as clarakurz. Would love to figure this out if anyone has any tips! Thanks!

    The emails I get look like this:

    New user registration on your site [site name]:

    Username:

    E-mail:

    I’m also having the same problem – no admin email notification for new customers but other admin email notifications work.

    The code snippet produces the same blank results.

    Any know the solution?

    I ran in to the same problem. I installed a plugin which allows to order your users list by date of registration. This way you can find out who recently registered. This works fine for me.

    https://www.ads-software.com/plugins/recently-registered/

    Try this and it working find with me on Woocommerce 2.1.7

    https://stackoverflow.com/questions/14343928/woocommerce-new-customer-admin-notification-email

    Actually the only file you need to override is your_template_directory/woocommerce/emails/customer-new-account.php.

    At the end of this file add this line of code:
    =========================================================
    <?php do_action( ‘new_customer_registered’, $user_login ); ?>
    =========================================================

    In functions.php add this:
    ================================================
    function new_customer_registered_send_email_admin($user_login) {
    ob_start();
    do_action(‘woocommerce_email_header’, ‘New customer registered’);
    $email_header = ob_get_clean();
    ob_start();
    do_action(‘woocommerce_email_footer’);
    $email_footer = ob_get_clean();

    woocommerce_mail(
    get_bloginfo(‘admin_email’),
    get_bloginfo(‘name’).’ – New customer registered’,
    $email_header.'<p>The user ‘.esc_html( $user_login ).’ is registered to the website</p>’.$email_footer
    );
    }
    add_action(‘new_customer_registered’, ‘new_customer_registered_send_email_admin’);
    ==============================================

    I remember seeing that before. It did not help me. I don’t even get an email notification using that code.

    @msngmedia GENIUS!!!
    works for me in woocomeerce 2.1.7!!!
    THX!

    Any useful suggestions?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Woocommerce New Customer Registration – Send email notification to Admin’ is closed to new replies.