• Hi,
    My 1st question:
    how can I disable the strong password at the time of registration?
    This is not working anymore
    add_filter( ‘wcfm_is_allow_passowrd_strength_check’, ‘__return_false’ );

    My 2nd question:
    I want to vendors see their reviews on dashboard but can’t click approve or unapprove buttons. How can i do?

    Thanks beforehand

Viewing 6 replies - 1 through 6 (of 6 total)
  • For me i use this for all strong password concerned by wc, test try .. maybe it could work for you ..

    function wc_ninja_remove_password_strength() {
    if ( wp_script_is( ‘wc-password-strength-meter’, ‘enqueued’ ) ) {
    wp_dequeue_script( ‘wc-password-strength-meter’ );
    }
    }
    add_action( ‘wp_print_scripts’, ‘wc_ninja_remove_password_strength’, 100 );

    Thread Starter frankbaku

    (@frankbaku)

    @medg Thanks for reply but it didn’t work for me.

    Use this code snippet change the “return 1” to what ever strength you want the password to be. Add to your functions.php or use the snippets plugin.

    ///*Fix woo password strength cause its annoying when testing *///
    add_filter( 'woocommerce_min_password_strength', 'reduce_min_strength_password_requirement' );
    function reduce_min_strength_password_requirement( $strength ) {
        // 3 => Strong (default) | 2 => Medium | 1 => Weak | 0 => Very Weak (anything).
        return 1; 
    }
    • This reply was modified 4 years, 4 months ago by ckfam.
    • This reply was modified 4 years, 4 months ago by ckfam.
    Thread Starter frankbaku

    (@frankbaku)

    @ckfam Thank you for answer. But not fixed. My form is this.

    do_action( ‘wcfm_membership_registration_form_after_dynamic_custom_fields’ );

    if( !$user_id ) {
    $WCFM->wcfm_fields->wcfm_generate_form_field( apply_filters( ‘wcfm_membership_registration_fields_password’, array(
    “passoword” => array( ‘label’ => __(‘Password’, ‘wc-multivendor-membership’) , ‘type’ => ‘password’, ‘custom_attributes’ => array( ‘required’ => 1, ‘mismatch_message’ => __( ‘Password and Confirm-password are not same.’, ‘wc-multivendor-membership’ ) ), ‘class’ => ‘wcfm-text wcfm_ele ‘, ‘label_class’ => ‘wcfm_ele wcfm_title’, ‘value’ => ” ),
    “password_strength” => array( ‘type’ => ‘html’, ‘value’ => ‘<div id=”password-strength-status”></div>’ ),
    “confirm_pwd” => array( ‘label’ => __(‘Confirm Password’, ‘wc-multivendor-membership’) , ‘type’ => ‘password’, ‘custom_attributes’ => array( ‘required’ => 1 ), ‘class’ => ‘wcfm-text wcfm_ele ‘, ‘label_class’ => ‘wcfm_ele wcfm_title’, ‘value’ => ” ),
    ) ) );
    }

    do_action( ‘end_wcfm_membership_registration_form’ );

    Thread Starter frankbaku

    (@frankbaku)

    Thread Starter frankbaku

    (@frankbaku)

    I removed all below codes from wcfmvm-script-membership-registration.js but still it shows on front end. How is it possible?

    $(‘#passoword’).keyup(function() {
    if( wcfm_registration_params.is_strength_check ) {
    checkStrength($(‘#passoword’).val());
    }
    });

    function checkStrength( password ) {
    var strength = 0
    if (password.length < 6) {
    $(‘#password_strength’).removeClass();
    $(‘#password_strength’).addClass(‘short’)
    $(‘#password_strength’).html(wcfm_registration_params.short);
    return ‘short’;
    }
    if (password.length > 7) strength += 1
    // If password contains both lower and uppercase characters, increase strength value.
    if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) strength += 1
    // If it has numbers and characters, increase strength value.
    if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) strength += 1
    // If it has one special character, increase strength value.
    if (password.match(/([!,%,&,@,#,$,^,*,?,_,~])/)) strength += 1
    // If it has two special characters, increase strength value.
    if (password.match(/(.*[!,%,&,@,#,$,^,*,?,_,~].*[!,%,&,@,#,$,^,*,?,_,~])/)) strength += 1
    // Calculated strength value, we can return messages
    // If value is less than 2
    if (strength < 2) {
    $(‘#password_strength’).removeClass()
    $(‘#password_strength’).addClass(‘weak’)
    $(‘#password_strength’).html( wcfm_registration_params.weak );
    return ‘weak’;
    } else if (strength == 2) {
    $(‘#password_strength’).removeClass()
    $(‘#password_strength’).addClass(‘good’)
    $(‘#password_strength’).html( wcfm_registration_params.good );
    return ‘good’;
    } else {
    $(‘#password_strength’).removeClass()
    $(‘#password_strength’).addClass(‘strong’)
    $(‘#password_strength’).html( wcfm_registration_params.strong );
    return ‘strong’;
    }
    }

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘strong password and review’ is closed to new replies.