-
-
Save rafabarbosa/50925c799107847406a51ad0cdf6e89f to your computer and use it in GitHub Desktop.
WooCommerce - Send "New User Registration" email to admins when new customer 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 | |
/** | |
* Send "New User Registration" email to admins when new customer is created on WooCommerce. | |
* | |
* @param int $id New customer ID. | |
*/ | |
function my_wc_customer_created_notification( $id ) { | |
wp_new_user_notification( $id, null, 'admin' ); | |
} | |
add_action( 'woocommerce_created_customer', 'my_wc_customer_created_notification' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment