learndash_user_set_enrolled_courses learndash_user_set_enrolled_courses( int $user_id, array $user_courses_new = array() ) Enrolls the user in new courses. ContentsDescription Parameters Source Changelog Related Namespace @package Uses Used By Description # Parameters # $user_id (int) (Optional) The ID of user to enroll courses. Default 0. $user_courses_new (array) (Optional) An array of new course ids to enroll a user. Default value: array() Source # File: includes/ld-users.php Changelog # Changelog Version Description 2.2.1 Introduced. Related # Namespace # global @package # LearnDash / Users Uses # Uses Uses Description includes/class-ldlms-transients.php: LDLMS_Transients::delete () Delete object cache by key. includes/ld-users.php: learndash_user_get_enrolled_courses () Gets the list of all courses enrolled by the user. includes/course/ld-course-user-functions.php: ld_update_course_access () Updates the list of courses a user can access. Used By # Used By Used By Description includes/admin/class-learndash-admin-user-profile-edit.php: Learndash_Admin_User_Profile_Edit::save_user_profile () Save WP User Profile hook.
Uses # Uses Uses Description includes/class-ldlms-transients.php: LDLMS_Transients::delete () Delete object cache by key. includes/ld-users.php: learndash_user_get_enrolled_courses () Gets the list of all courses enrolled by the user. includes/course/ld-course-user-functions.php: ld_update_course_access () Updates the list of courses a user can access.
Used By # Used By Used By Description includes/admin/class-learndash-admin-user-profile-edit.php: Learndash_Admin_User_Profile_Edit::save_user_profile () Save WP User Profile hook.