seoki
Forum Replies Created
-
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
In reply to: [Theme My Login] Radio button implementationHi Jeff, thank you so much. That worked great! Thank you again ??
Forum: Plugins
In reply to: [Theme My Login] Radio button implementationHere 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 functionfunction 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.