1

Is there a way to let a user who registers an account in WP add 2 email addresses that will be associated with that account?

The reason for the required function: We have a website that sells online courses that will be used by High School students. Normally the parent will do the registration because they will also need to do a credit card payment to buy courses. So we would like to have the main account address to be the parent's, and then a second address that will be the student's.

We're using WP Courseware for the courses. Once we have implemented the 2 addresses on the accounts, we want to update the WP Courseware plugin to also send all course notifications to both the parent and student.

0

You can create usermeta at time of insert user like, i create zip code in my site see this code,

$user_id = wp_insert_user(
                            array(
                                'user_login'    =>  $user_email,
                                'user_pass'     =>  wp_generate_password ( 12, false ),
                                'first_name'    =>  'khushu',
                                'last_name'     =>  'soni',
                                'user_email'    =>  $user_email,
                                'display_name'  =>  'khushu' . ' ' . 'soni',
                                'nickname'      =>  'khushu' . ' ' . 'soni',
                                'role'          =>  'Subscriber'
                            )
                        );
                        update_user_meta( $user_id, 'zip_code', '56789' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.