Home › Forums › Legacy Support › Support queries › Setup issues › "Take this Course" does not redirect to Register/Login
Tagged: button, register, take this course
- This topic has 7 replies, 5 voices, and was last updated 7 years, 6 months ago by get_peace.
Viewing 8 posts - 1 through 8 (of 8 total)
-
AuthorPosts
-
November 7, 2016 at 6:44 am #78375ennoblegroupincSpectatorHi, 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 ?November 7, 2016 at 6:54 am #78377ennoblegroupincSpectatorThis reply has been marked as private.November 7, 2016 at 8:48 am #78387MrVibeKeymasterI 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 :add_filter('wplms_take_course_
button_html','custom_non_ loggedin_user_redirect',99,2); Let me know if above helps.May 30, 2017 at 11:09 am #114724get_peaceSpectatorHi... 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.May 30, 2017 at 1:41 pm #114750H.K. LatiyanParticipantHi... 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/fdtne4May 30, 2017 at 2:03 pm #114757get_peaceSpectatorThat 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?May 30, 2017 at 2:09 pm #114761Skywalker [ ex VibeThemes]ParticipantHi, 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 :)May 30, 2017 at 2:11 pm #114762get_peaceSpectatorYes, ok. Thank you. -
AuthorPosts
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.