Take this course button redirect

Home Forums Legacy Support Support queries How-to & Troubleshooting Take this course button redirect

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #63843
    danielh
    Spectator
    I wanted "Take this course" button to redirect users not logged in to the registration page. I followed instructions on another forum that said to edit the customizer plugin with the following code:   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='http://localhost/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; }   It however did not work for me. You can test here: http://www.thecollegesystem.com/course/college-basics-course/
    #63951
    H.K. Latiyan
    Participant
    Ok I checked your site using the credentials shared on another topic. I found out your wplms-customizer.php file is empty, there is no code present, refer: http://prntscr.com/c4q4pg So now I added the code in the file and still it didn't worked, so to debug the issue I tried to print some value in the take this course button but its not showing anything. This seems to be a caching issue may be server caching so try clearing all type of caching and specially the server cache and then check. I checked the code and it works fine on my test setup so it should work on your website also, just try clearing the cache. Let me know if this helps.
    #64448
    danielh
    Spectator
    I did clear the server / page cache which I think was caused by the recent installation of w3 cache. While this was messing up other changes I made to CSS and on/off functionality changes in the theme. This issue seems to still persist. I have checked everything (cleared the page cache, looked at the plugin code again etc). Can you check again?
    #64901
    H.K. Latiyan
    Participant
    Ok I have added the code and now it works fine please check and confirm.
    #65386
    danielh
    Spectator
    thanks
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Take this course button redirect’ is closed to new replies.