Hello,
i followed the instructions and pasted the code in wplms customizer plugin editor but still not working. Could you please check it out?
This reply has been marked as private.
Yes, same here. I added the code and nothing happened.
Thank you!
This reply has been marked as private.
This reply has been marked as private.
@dopritem: Thanks for sharing the site url, also share the admin credentials with us to check the code and why its not working on your website.
Please make sure you have added the code from here:
https://wplms.io/support/knowledge-base/redirect-non-logged-in-users-to-register-page-when-they-click-on-take-this-course-button/
@patriciab: Thanks for sharing the admin credentials I checked your site, you have not even added the code, so its not working.
Please 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/
This reply has been marked as private.
I added a different code similar from another thread because we want to redirect them to a specific page not the buddy press register page. Since it didn't work I removed it but I have added it again - no success yet. Is there an updated code for something like this or did I miss something?
Thank you!
This reply has been marked as private.
The above code is for the courses which have woocommerce product connected .
But all your courses are either Free or Private .
So added two more lines with the code to make it work for free and private courses :
add_filter('wplms_course_non_loggedin_user','custom_non_loggedin_user_redirect',10,2);
add_filter('wplms_private_course_button_html','custom_non_loggedin_user_redirect',10,2);
This reply has been marked as private.
@dopritem: Thanks for confirming, so closing the topic.
@patriciab: I checked your site the code is only for courses which are connected to woocommerce product and if there are free or private courses then the two filters mentioned by Alex can be used. But all your courses are connected with memberships and unfortunately there is no such filter available for membership courses.
Also its not even an issue because when the non logged in users select some membership and take the course then they are redirected to the membership level page where they can select the membership and then automatically register on the checkout page.