Notify Admin When New Account is Created WooCommerce Store?

One of my clients has been having a hard time, trying to figure out how he could customize his WooCommerce store to notify admin anytime a new account is created in his store.

He wanted to notify admin so he could tag a customer’s account based on the type of purchase they want to make.

The problem here is that this functionality is not built into WooCommerce. So, it’s quite challenging to put customers in the right customer group.

Now,  is it possible to have an email sent to the Admin every time a new customer account is created?

The answer is Yes. It’s possible!

If you have been trying all sorts of email plugins and aren’t making headway with it, here is a simple method that can help you out.

First, Add code to the default WooCommerce customer-new-account.php file. Secondly, you’ll need to add a simple function to the functions.php file.

– To do this, make sure you add in file customer-new-account.php  the following line of code at the end.

php do_action( 'new_customer_registered', $user_login );

After that, add this snippet to functions.php:

add_action( 'woocommerce_created_customer', 'woocommerce_created_customer_admin_notification' );

function woocommerce_created_customer_admin_notification( $customer_id ) {

wp_send_new_user_notifications( $customer_id, 'admin' );

}

When you do this, Your Shop will notify admin every time a new account is created.

That is it. I hope you’ve found this useful.

Waqas

I hope you enjoy reading this blog post. If you want my team to do WooCommerce Maintenance for you, click here.

Leave a Comment

Your email address will not be published. Required fields are marked *