WooCommerce - Notify admin when a new customer account is created
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not include this if already open! | |
/** | |
* Code goes in theme 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' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi mike,
great job!
How can I change admin to a different email adress?
... ( $customer_id, 'admin@abc.com' ); does not work