WordPress.org

Ready to get started?Download WordPress

Forums

Register Plus Redux
[resolved] Redux login with woocommerce - error (7 posts)

  1. hamzahali
    Member
    Posted 5 months ago #

    When using redux login

    with following settings,

    Auto login, after register
    Select password manually,

    and is woocommerce is installed,

    then u can never register,
    it says password should be 6 characters, (even though its more than that)

    Can you pls check

    https://wordpress.org/plugins/register-plus-redux/

  2. radiok
    Member
    Plugin Author

    Posted 5 months ago #

    Register Plus Redux does not work with WooCommerce, this is a known incompatibility.

  3. Tony Franco
    Member
    Posted 5 months ago #

    Hi radiok!

    Wonderful plugin!!

    I have an issue too...

    When an user try to reset his password, the link in email is corrupted... and the link goes: http://www.mysite.com/my-account/lost-password/.....

    This "my-account" page is from woocommerce i think..

    Users canĀ“t reset their passwords....

    Do you have a suggestion for this?

    Thanks and Regards,

    Tony

  4. curious12
    Member
    Posted 5 months ago #

    Great plug in. Seems to work ok with Woocommerce in Firefox, but not in IE. Is a fix in the works?

  5. dwlorimer
    Member
    Posted 5 months ago #

    @radiok - I have some information that might be helpful.

    @hamzahali - I had the exact same problem and have found a solution.
    @radiok, please investigate this solution and include in your next plugin release.

    There are some compatibility problems when using woocommerce and register plus redux together.
    However, in regard to the specific issue about the password always claiming it must be 6 characters, I have a solution.

    There appears to be a problem in the way \register-plus-redux\rpr-login.php is written.

    Here's what it's doing, FYI, and for future reference:

    In this file:
    \plugins\register-plus-redux\rpr-login

    At line 95, it UNSETS $_POST['pass1']

    public /*.string.*/ function rpr_login_filter_random_password( /*.string.*/ $password ) {
    			global $register_plus_redux;
    			global $pagenow;
    			if ( 'wp-login.php' === $pagenow && '1' === $register_plus_redux->rpr_get_option( 'user_set_password' ) ) {
    				if ( isset( $_REQUEST['action'] ) && 'register' === $_REQUEST['action'] ) {
    					if ( isset( $_POST['pass1'] ) ) {
    						$password = sanitize_text_field( (string) $_POST['pass1'] );
    						// Stowe password in $_REQUEST to allow random password generator to continue while preserving for user_register action
    						$_REQUEST['password'] = $password;
    						unset( $_POST['pass1'] );
    					}
    				}
    			}
    			return $password;
    		}

    Then, at lines 437 and 440, it checks for the variable again. As best as I can tell, line 95 executes before lines 437 and 440 (they are in different functions).

    if ( '1' === $register_plus_redux->rpr_get_option( 'user_set_password' ) ) {
    				if ( empty( $_POST['pass1'] ) && '1' !== $register_plus_redux->rpr_get_option( 'disable_password_confirmation' ) ) {
    					$errors->add( 'empty_password', '<strong>' . __( 'ERROR', 'register-plus-redux' ) . '</strong>:&nbsp;' . __( 'Please enter a password.', 'register-plus-redux' ) );
    				}
    				elseif ( strlen( (string) $_POST['pass1'] ) < absint( $register_plus_redux->rpr_get_option( 'min_password_length' ) ) ) {
    					$errors->add( 'password_length', sprintf( '<strong>' . __( 'ERROR', 'register-plus-redux' ) . '</strong>:&nbsp;' . __( 'Your password must be at least %d characters in length.', 'register-plus-redux' ), absint( $register_plus_redux->rpr_get_option( 'min_password_length' ) ) ) );
    				}

    So, all I did was comment out the unset on line 95, and everything started working again.

    According to the code surrounding line 95, it appears to me that the later lines should be calling the $password variable, instead of $_POST['pass1'], but none of them do.

    So this fix works (of just commenting out the unset), but I think there's an underlying problem in the plugin itself.
    This fix works for me using Register plus Redux with WooCommerce

  6. bulewold
    Member
    Posted 3 months ago #

    So long story short, Redux register has no plan to make it compatible with woocommerce? just curious cuz I have same issue...

  7. gsandf
    Member
    Posted 2 months ago #

    Not working for me as well.
    Does anyone know of a good alternative?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.