Skip to content

Instantly share code, notes, and snippets.

@ajmorris
Created March 28, 2018 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajmorris/f5e7e0f22134bc547758c18492efa8e0 to your computer and use it in GitHub Desktop.
Save ajmorris/f5e7e0f22134bc547758c18492efa8e0 to your computer and use it in GitHub Desktop.
Notify admin when a new customer account is created - WooCommerce
<?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