Title: Run a function on customer registration
Last modified: October 19, 2017

---

# Run a function on customer registration

 *  Resolved [doubleedesign](https://wordpress.org/support/users/doubleedesign/)
 * (@doubleedesign)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/run-a-function-on-customer-registration/)
 * Hi,
 * I am trying to run a function when a user registers on a site. It works perfectly
   when I register someone manually in the backend, but not when someone registers
   themselves through the WooCommerce checkout process.
 * Here’s the outline:
 *     ```
       function do_something_on_registration($user_id) {
       	// do stuff
       }
       add_action( 'user_register', 'do_something_on_registration', 10, 1 ); 
       ```
   
 * Is there another hook I should be using in this context rather than user_register?
 * Thanks for your time!

Viewing 1 replies (of 1 total)

 *  Thread Starter [doubleedesign](https://wordpress.org/support/users/doubleedesign/)
 * (@doubleedesign)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/run-a-function-on-customer-registration/#post-9610216)
 * Solved – there were some issues with my function itself, and someone on another
   forum suggested the `woocommerce_created_customer` hook instead. A combination
   of these things allowed me to fix my issue.

Viewing 1 replies (of 1 total)

The topic ‘Run a function on customer registration’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [doubleedesign](https://wordpress.org/support/users/doubleedesign/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/run-a-function-on-customer-registration/#post-9610216)
 * Status: resolved