WordPress.org

Support

Support » Plugins and Hacks » Register Plus Redux » [Resolved] Redux login with woocommerce – error

[Resolved] Redux login with woocommerce – error

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author radiok

    @radiok

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

    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

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

    @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

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

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Redux login with woocommerce – error’ is closed to new replies.
Skip to toolbar