Home Forums WoodMart support forum Login/Register error

Login/Register error

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #181150

    leejay123
    Participant

    I currently have the side panel option login/register enabled on my site and WP rocket.

    Now if a user tries to login vie the side panel with the correct credentials it takes them, direct to the my account page shown here https://gyazo.com/2fed4a9a06ef7547d12b43c1b15a5d99

    I understand it takes you direct to the account page by default but it doesn’t log the user in even though the credentials are correct.

    However i can assure you that when logging in view side panel the login credentials for the user is 100% correct. It should take me direct to my account.

    Is there something i need to exclude within wp rocket? some javascript?

    #181239

    Artem Temos
    Keymaster

    Hello,

    Try to add the following PHP code snippet to the child theme functions.php file to fix this

    add_filter(
    	'init',
    	function() {
    		if ( isset( $_REQUEST['woocommerce-login-nonce'] ) ) {
    			$_REQUEST['woocommerce-login-nonce'] = wp_create_nonce( 'woocommerce-login' );
    		}
    	}
    );

    Regards

    #181305

    leejay123
    Participant

    Thank you for the code.

    I do not have a child theme however i have added the code into my theme functions.php file and its seems to be working perfectly fine now so thank you for that.

    Question 1: What does the code do?
    Question 2: Does this code affect anything else?
    question 3: Does this stop the login/register side panel from caching with WP-ROCKET?

    #181343

    Artem Temos
    Keymaster

    Yes, it simply fixes the problem with login form and cache plugin.

    #183173

    leejay123
    Participant

    This can be marked as solved.

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Login/Register error’ is closed to new replies.