Advertisement
Guest User

Affiliates Woocommerce Email Validation

a guest
Jul 27th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. add_action('woocommerce_created_customer', 'affiliates_woocommerce_created_customer' );
  2.  
  3. function affiliates_woocommerce_created_customer ( $user_id, $new_customer_data, $password_generated ) {
  4.         if ($user_id != null) {
  5.                 if ( $group = Groups_Group::read_by_name( 'Registered' ) ) {
  6.                         $result = Groups_User_Group::create( array( "user_id"=>$user_id, "group_id"=>$group->group_id ) );
  7.                 }
  8.         }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement