Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created February 10, 2017 14:49
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mikejolley/4173a34fa7a6bd93d67f5a343886388e to your computer and use it in GitHub Desktop.
Save mikejolley/4173a34fa7a6bd93d67f5a343886388e to your computer and use it in GitHub Desktop.
WooCommerce - Notify admin when a new customer account is created
<?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' );
}
@dk430
Copy link

dk430 commented Aug 18, 2020

Hi mike,
great job!
How can I change admin to a different email adress?

... ( $customer_id, 'admin@abc.com' ); does not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment