Title: seoki's Replies | WordPress.org

---

# seoki

  [  ](https://wordpress.org/support/users/seoki/)

 *   [Profile](https://wordpress.org/support/users/seoki/)
 *   [Topics Started](https://wordpress.org/support/users/seoki/topics/)
 *   [Replies Created](https://wordpress.org/support/users/seoki/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/seoki/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/seoki/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/seoki/engagements/)
 *   [Favorites](https://wordpress.org/support/users/seoki/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions] PayPal – "Please complete all required fields."](https://wordpress.org/support/topic/paypal-please-complete-all-required-fields/)
 *  [seoki](https://wordpress.org/support/users/seoki/)
 * (@seoki)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/paypal-please-complete-all-required-fields/#post-6771775)
 * Hi Jason, I am getting these errors while submitting the payment. I have the 
   stripe api key on a test mode. I am loading the jquery inside the <head>tag.
 *     ```
       Uncaught ReferenceError: Stripe is not defined            ?level=3:105
       Uncaught TypeError: jQuery(...).validateCreditCard is not a function    ?level=3:271
       ```
   
 * Can you please help me? I am trying to correct this for a while on my own but
   in vain 🙁
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme My Login] Radio button implementation](https://wordpress.org/support/topic/radio-button-implementation/)
 *  Thread Starter [seoki](https://wordpress.org/support/users/seoki/)
 * (@seoki)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/radio-button-implementation/#post-6883829)
 * Hi Jeff, thank you so much. That worked great! Thank you again 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme My Login] Radio button implementation](https://wordpress.org/support/topic/radio-button-implementation/)
 *  Thread Starter [seoki](https://wordpress.org/support/users/seoki/)
 * (@seoki)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/radio-button-implementation/#post-6883792)
 * Here is my update on the code which does not help me either 🙁 All this is in
   the theme-my-login-custom.php file.
 * In my register page I have two radio choices (Role1/Role2)
 * It is adding “None” for role in the user list.
 *     ```
       <?php
       function tml_registration_errors( $errors ) {
       	if ( !isset( $_POST['user_role'] ) )
               $errors->add('empty_user_role', '<strong>ERROR</strong>: Please select a role.');
           return $errors;
       }
       add_filter( 'registration_errors', 'tml_registration_errors' );
   
       function register_role( $user_id ) {
       	// Instantiate a user object
       	$user = new WP_User( $user_id );
       echo "<script>alert('".$_POST['user_role']."');</script>";
   
       	// Set your role
       	$user->set_role( $_POST['user_role'] );
   
       	// Destroy user object
       	unset( $user );
       }
       add_action( 'user_register', 'register_role' );
   
       ?>
       ```
   
 * The echo wont even trigger to get an alert box to show the $_POST[‘user_role’]
   
   But the error module catches if I don’t select a role in my register page.
 * This is the second approach that I am taking, which is not working either –
    
   Even in this approach error module catches if I don’t select a role in my register
   page.But echo alert wont trigger for me to debug which tells me its not even 
   coming to this function
 *     ```
       function tml_user_register( $user_id ) {
       $user = new WP_User( $user_id );
   
           if (isset($_POST['user_role'] ) ) && $_POST['user_role'] = 'Role1' ){
           echo "<script>alert('" . $_POST['user_role'] . "');</script>";
           $user->set_role( $_POST['user_role'] );
       	unset( $user );
          }else{
           echo "<script>alert('" . $_POST['user_role'] . "');</script>";
           $user->set_role( 'Role2' );
       	unset( $user );
           }
       ```
   
 * //add_action( ‘user_register’, ‘tml_user_register’ );
 * Please somebody help me on this.

Viewing 3 replies - 1 through 3 (of 3 total)