WCMp bundle is available at a slashed price

Grab It Now

Vendor Registration Validation

Vendor Registration Validation2019-05-30T06:24:25-05:00

Home Support Forum WCMp Vendor Frontend Reports Vendor Registration Validation

WCMp Vendor Frontend Reports

Vendor Registration Validation Open

  • Author
    Posts
  • osama.designer
    Participant
    Post count: 7

    In the vendor registration the password field showing character validation. If i am click on register button. It registered instead validate it… I want to same as customer registration.

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 4059

    Hi Osama, The customer registration page comes from WooCommerce.
    Now, WooCommerce already provides the password field validation, as you can see here – https://prnt.sc/nvf856.

    Can you please check again.

  • osama.designer
    Participant
    Post count: 7

    yes but that was customer registration section.And i ask about vendor registration form. check this link
    http://eayuni.com/vendor-registration
    I want validation same like customer registration . If my password character minimum 12 the register button should be disable.

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 4059

    @osama.designer, currently we display vendor that the added password is week/strong. However, this doesn’t control whether the vendor can click on the register button.

    However, you can do custom code and add this restriction. If you need reference of hook/filter, let us know.

  • osama.designer
    Participant
    Post count: 7

    ok can you please made filter for this. its very helpful for us pleasee..

  • Raju The Cool Guy
    Moderator
    Post count: 126

    Hi @osama.designer,
    In order to add the restriction, add this code to the function.php of the current active theme :

    add_filter('woocommerce_registration_errors', 'woocommerce_registration_errors_password_length', 10,3);
    function woocommerce_registration_errors_password_length($reg_errors, $sanitized_user_login, $user_email) {
           global $woocommerce;
           if(strlen($_POST['password'])<12){
                return new WP_Error( 'registration-error', __( 'Password strength is too low.', 'woocommerce' ) );
           }
           return $reg_errors;
    }
  • osama.designer
    Participant
    Post count: 7
    This reply has been marked as private.
  • NerdySupportExpert Moumita
    Keymaster
    Post count: 4059

    Hi @osama.designer, it might be a permalink issue.

    So goto wp-admin >> settings >> permalink and click on Save Changes.

  • osama.designer
    Participant
    Post count: 7

    I want that if admin create vendor store. after creation store credentials will send to vendor via email automatically. Is it possible? please help i am stuck.
    Thanks

  • CrazyPluginAuthor Khokan
    Keymaster
    Post count: 195

    @osama.designer using do_action( 'user_register', $user_id ) hook you have to trigger wp_new_user_notification($user_id, null, 'user') functionalities to send notificatation to user.
    And to modify email content or add extra you can use this apply_filters( 'wp_new_user_notification_email', $wp_new_user_notification_email, $user, $blogname ) filter

Please LOGIN to reply to this topic