"Take this Course" does not redirect to Register/Login

Home Forums Legacy Support Support queries Setup issues "Take this Course" does not redirect to Register/Login

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #78375
    Hi, When I select "Take this Course" button, it's not redirecting me to "Register/Login" screen despite implementing the solution mentioned before:(WPLMS-CUSTOMIZER PLUGIN) add_filter('wplms_take_course_button_html','custom_non_loggedin_user_redirect',10,2); function custom_non_loggedin_user_redirect($html,$course_id){ if(!is_user_logged_in()){ $extra =''; $register_page='https://ennobletrainings.com/wplms/register'; return ''.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).''; } return $html; } Even if I am logged in, After clicking on "Take This course" it does not take me to the Check out page, it comes back to the Original Course page ... Am i missing something here ? Its bit urgent, can you please answer this asap ?    
    This reply has been marked as private.
    I see that you're using WPLMS WooCommerce plugin which is why it is not working as expected.
    I enabled the switch WP Admin - WooCommerce - Settings - Products - Display - Redirect to the cart page after successful addition and now the user is redirected to cart page.
    Since WooCommerce itself has the capability to register and login the user on the checkout itself, I would recommend to disable the tip that you're using as it might be more of a hinderence towards the buying customer.
    if you still want to redirect the non-loggedin user to the registration page,  change the first line in the code :
    Let me know if above helps.
    Hi... I also want to redirect non logged in users to registration page on "TAKE THIS COURSE" button click. I try that code but obviously it did not work on my site and after I insert it to WPLMS-CUSTOMIZER I see only text "TAKE THIS COURSE" without clickable option for redirection The good news is that as logged in user I stills ee the button and it bring me to check out.
    H.K. Latiyan
    Hi... If you want to redirect non logged in users to register page then refer this tip: https://wplms.io/support/knowledge-base/redirect-non-logged-in-users-to-register-page-when-they-click-on-take-this-course-button/ --------------- However we have a setting present in lms settings, which will not redirect non logged in users to registration page but will open the login popup. This setting is present in the lms->settings, refer: http://prntscr.com/fdtne4
    That sounds grat, but when i activate that option in my LMS panel, the button do not work... When i click on it it does nothing. Anyiway, the code in wplms-customizer works, and now the non loged in users are redirected which is fine for me. Just if you have any idea why the other optiondo not work?
    Hi, Glad to know that it fixed your issue. The custom code added to the customiser plugin will remain even after updating the themes and the plugins. So you can feel relaxed about this issue. So i am marking the topic as resolved and Closing the topic. Thanks you. Have a nice day :)  
    Yes, ok. Thank you.
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘"Take this Course" does not redirect to Register/Login’ is closed to new replies.