Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('woocommerce_created_customer', 'affiliates_woocommerce_created_customer' );
- function affiliates_woocommerce_created_customer ( $user_id, $new_customer_data, $password_generated ) {
- if ($user_id != null) {
- if ( $group = Groups_Group::read_by_name( 'Registered' ) ) {
- $result = Groups_User_Group::create( array( "user_id"=>$user_id, "group_id"=>$group->group_id ) );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement