Sensei LMS plugin – Enroll user in Course

I am building a custom Plugin that works with both WooCommerce and SenseiLMS plugin , in the plugin I am usingSensei_Utils::user_start_course($user_id, course_id); function to add users to a course. While this seems to work it just add the user in course but does not enroll it in the course.

Is there any function other than I am using to actually achieve I can't find the function anywhere , I am searching or surfing through github code for sensei LMS to find the exact function but no luck .

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer