Viewing 1 replies (of 1 total)
  • Hi @sonisitez,

    Please paste this code in your active theme’s functions.php file at the end.

    Here is the code:

    
    // Logout without confirmation.
    function ur_modify_logout( $url, $endpoint, $value, $permalink ) {
    
    	if( 'user-logout' === $endpoint ) {
    		$url = add_query_arg( array(
    					'_wpnonce' => wp_create_nonce( 'user-logout' ),
    				),
    				$url
    				);
    	}
    	return $url;
    }
    add_filter( 'user_registration_get_endpoint_url', 'ur_modify_logout', 10, 4 );
    

    Let me know if it works or not and I will get back to you.
    Regards!

Viewing 1 replies (of 1 total)
  • The topic ‘Logout Without Confirmation’ is closed to new replies.