Woocommerce New Customer Registration – Send email notification to Admin
-
Hi,
When a new user register an account through Woocommerce Login page, admin is getting mail.I am using below function to send email.
// Woocommerce New Customer Admin Notification Email 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');
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
It is working fine. I want to send registered email id also with username.
Can somebody suggest any solution.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Woocommerce New Customer Registration – Send email notification to Admin’ is closed to new replies.