Registration email send to ADMIN with FULL DETAILS
-
My problem is very similar to this topic, with some more additions. I used the solution from there but…
our_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 ); ?>
I used this code to make my woocommerce to send an email to the admin after a new user have been registered. But I would like send in that email all of the information from the registration, not just the $user_login
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'); ?>
and as a final question, I would like to send an email to more then one administrators (actually 2). If you can really help me, you are going to be gold!
Thank you!
- The topic ‘Registration email send to ADMIN with FULL DETAILS’ is closed to new replies.