Redirect Back to course Button to a custom page

This tip will help in redirecting a user to a custom page when user clicks on back to course button on course status page

a. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_Class.php
b. Add the following line in function _contstruct :

PHP Code:
add_action('wplms_course_start_after_timeline',array($this,'redirect_back_to_course_button'),999);

c. Add the following function in class :

PHP Code:
 function redirect_back_to_course_button(){
 	if(is_user_logged_in()){
 		global $current_user;
		$login_page='your-site-url/members/'. $current_user->user_login.'/course/';
 		echo '';
 	}

 }

Leave a Reply

Your email address will not be published. Required fields are marked *