Hi guys,
Sorry to re-open this old topic. It's about this tip :
https://wplms.io/support/knowledge-base/wpml-compatible-link-on-logo/
I realized that the tip erases the login redirect settings in LMS > settings, and that it always redirect users to the home page. This is very annoying.. 2 scenarios:
- users purchasing stuff arrive on checkout, then login, then all of sudden they're back to the home page.. > they have to go through the cart menu on top > cart page > then checkout page. This is not good for commerce + it's disturbing.
- course subscribers go all the way to the course they want to take, then login to access it and -bam- back to homepage... not cool.
This is why I really need to be able to redirect users to their current page. It is part of a well coded and conceived website :-) + the option is there in your settings.
Can you help please?
Thanks!
Well this is something we tried to fix in the wplms version 2.5 by using the same function to generate the login form action attribute to wp-login.php .
Now we use the same function " site_url " that bbpress plugin use .
Please remove this code now and check if the login issue is fixed or not :
add_filter('wplms_login_widget_action','wplms_login_widget_login_link_correction');
function wplms_login_widget_login_link_correction($login_link){
if(function_exists('icl_object_id')){
$login_link = wp_login_url(home_url());
}
return $login_link;
}
Set the login redirect settings to " same page " in wp-admin -> lms -> settings .
Hi,
You can hit resolve on this topic, it works perfectly for a while now!
Thanks!