Creating a custom register form

Ok, I found the solution.

I placed the ‘wp_insert_user’ in a variable.

And I used that variable to define the extra fields with ‘update_user_meta’.

// If successful, register user
 $user_id = wp_insert_user($fields);
 update_user_meta( $user_id, 'teste', $fields['teste'] );