WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Woocommerce New Customer Registration - Send email notification to Admin (12 posts)

  1. qwid
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/woocommerce/

  2. jameskoster
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. qwid
    Member
    Posted 1 year ago #

    It does.
    http://codex.wordpress.org/Function_Reference/wp_new_user_notification

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

  4. toto
    Member
    Posted 1 year ago #

  5. ciarakurz
    Member
    Posted 5 months ago #

    @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!

  6. ianthedude
    Member
    Posted 4 months ago #

    @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:

  7. goyt
    Member
    Posted 4 months ago #

    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?

  8. lodix
    Member
    Posted 4 months ago #

    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.

    http://wordpress.org/plugins/recently-registered/

  9. msngmedia
    Member
    Posted 4 months ago #

    Try this and it working find with me on Woocommerce 2.1.7

    http://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');
    ==============================================

  10. ianthedude
    Member
    Posted 4 months ago #

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

  11. tikyt
    Member
    Posted 4 months ago #

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

  12. ianthedude
    Member
    Posted 3 months ago #

    Any useful suggestions?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic