Skip to content

Instantly share code, notes, and snippets.

@deeman
Created September 10, 2019 13:55
Show Gist options
  • Select an option

  • Save deeman/9c01ba17e115adf7b74a2a0a68728d95 to your computer and use it in GitHub Desktop.

Select an option

Save deeman/9c01ba17e115adf7b74a2a0a68728d95 to your computer and use it in GitHub Desktop.
WooCommerce: Notify admin when new customer account is created
/**
* Code goes in your Child 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' ); }
@deeman

deeman commented Sep 10, 2019 •

Copy link
Copy Markdown
Author

Change 'admin' with the username you want the emails to be sent to.

Ref.: https://docs.woocommerce.com/document/notify-admin-new-account-created/

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