Redirecting to Lessons for Enrolled Courses

In a student’s frontend dashboard, they can find all courses that they are enrolled to in the “Enrolled Courses” tab. When the student clicks on a course, it takes them to the course landing page. Instead, if you want to redirect the student directly to the first lesson, you can use this process:

Go to wp-content/plugins/tutor/templates/dashboard/enrolled-courses.php at line number 39. Here you can see this code:

$custom_url = home_url($post->post_type.’/’.$post->post_name);

After this line, add this code:

$lesson_url = tutor_utils()->get_course_first_lesson( get_the_ID() );

Now, replace the $custom_url with $lesson_url so that when you click on the title it will directly go to the lesson instead of the course page.

Was this helpful?