Home › Forums › WoodMart support forum › password verification
password verification
- This topic has 9 replies, 3 voices, and was last updated 6 years, 4 months ago by
abdullahustun42.
-
AuthorPosts
-
April 17, 2019 at 8:08 am #119297
abdullahustun42ParticipantHello there
can we do password verification on the membership page?
April 17, 2019 at 9:52 am #119330
Elise NoromitMemberHello,
Our theme does not have any membership pages. Seems you have a plugin. Please refer the plugin documentation or contact their support.
Best Regards
April 17, 2019 at 10:42 am #119383
abdullahustun42Participantthis page
enter the password 2 times
verification
enter the password again
Attachments:
You must be logged in to view attached files.April 17, 2019 at 12:59 pm #119412
Elise NoromitMemberHello,
Please check the issue on one of the default themes to understand if our theme causes the problem. We suspect that this is the issue of plugins conflict or your customization (if any) result. If you see the same situation on the default theme, deactivated all the third parties plugins not related to the theme and activate them one by one to discover which one influence.
If you applying the child theme switch to the parent and check.
Best Regards
April 17, 2019 at 1:25 pm #119415
abdullahustun42ParticipantI guess you didn’t understand me.
There is no problem now.
I ask how we can make them enter 2 times.
password two enter.
Attachments:
You must be logged in to view attached files.April 17, 2019 at 6:33 pm #119494
Elise NoromitMemberHello,
The default Woocommerce does not provide such an option and our theme does not influence. You will have to find a plugin to implement that.
Best Regards
April 17, 2019 at 9:16 pm #119522
abdullahustun42ParticipantHi
I want this picture.
Password confirm on register
Attachments:
You must be logged in to view attached files.April 17, 2019 at 9:21 pm #119524
abdullahustun42ParticipantOk
`// —– validate password match on the registration page
function registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) {
global $woocommerce;
extract( $_POST );
if ( strcmp( $password, $password2 ) !== 0 ) {
return new WP_Error( ‘registration-error’, __( ‘Passwords do not match.’, ‘woocommerce’ ) );
}
return $reg_errors;
}
add_filter(‘woocommerce_registration_errors’, ‘registration_errors_validation’, 10,3);// —– add a confirm password fields match on the registration page
function wc_register_form_password_repeat() {
?>
<p class=”form-row form-row-wide”>
<label for=”reg_password2″><?php _e( ‘Password Repeat’, ‘woocommerce’ ); ?> <span class=”required”>*</span></label>
<input type=”password” class=”input-text” name=”password2″ id=”reg_password2″ value=”<?php if ( ! empty( $_POST[‘password2’] ) ) echo esc_attr( $_POST[‘password2’] ); ?>” />
</p>
<?php
}
add_action( ‘woocommerce_register_form’, ‘wc_register_form_password_repeat’ );// —– Validate confirm password field match to the checkout page
function lit_woocommerce_confirm_password_validation( $posted ) {
$checkout = WC()->checkout;
if ( ! is_user_logged_in() && ( $checkout->must_create_account || ! empty( $posted[‘createaccount’] ) ) ) {
if ( strcmp( $posted[‘account_password’], $posted[‘account_confirm_password’] ) !== 0 ) {
wc_add_notice( __( ‘Passwords do not match.’, ‘woocommerce’ ), ‘error’ );
}
}
}
add_action( ‘woocommerce_after_checkout_validation’, ‘lit_woocommerce_confirm_password_validation’, 10, 2 );// —– Add a confirm password field to the checkout page
function lit_woocommerce_confirm_password_checkout( $checkout ) {
if ( get_option( ‘woocommerce_registration_generate_password’ ) == ‘no’ ) {$fields = $checkout->get_checkout_fields();
$fields[‘account’][‘account_confirm_password’] = array(
‘type’ => ‘password’,
‘label’ => __( ‘Confirm password’, ‘woocommerce’ ),
‘required’ => true,
‘placeholder’ => _x( ‘Confirm Password’, ‘placeholder’, ‘woocommerce’ )
);$checkout->__set( ‘checkout_fields’, $fields );
}
}
add_action( ‘woocommerce_checkout_init’, ‘lit_woocommerce_confirm_password_checkout’, 10, 1 );This code ok?
April 18, 2019 at 6:19 am #119554
Artem TemosKeymasterWe are not responsible for any 3d party codes taken from the internet. It is out of our theme support scope.
April 18, 2019 at 7:08 am #119582
abdullahustun42ParticipantHello there
I understand you.
I wondered if there was a problem adding this code.
thank you. -
AuthorPosts
- You must be logged in to create new topics. Login / Register