Redirect Non-logged in Users to Register Page when they click on Take this course button

Please add this code in your wplms-customizer.php file present in your wplms customizer plugin (go to wp-admin->plugins->editor->select wplms customizer plugin and add the code in wplm-customizer.php file) OR add the code in the function.php file of your child theme (if using a child theme):


function custom_non_loggedin_user_redirect($html,$course_id){
    $extra ='';    
    $page = '';
    return '<a href="'.$page.'" class="course_button full button">'.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).'</a>'; 
  return $html;

NOTE: Please change the url “” to your register page url

Was this article helpful?

Related Articles

Leave A Comment?