Posts Tagged ‘LearnDash’

Function to Enroll a User into a LearnDash Course

To enroll or unenroll a user from a LearnDash course programatically (using code), you use the ld_update_course_access() function. Enroll This function takes 3 arguments, the user id, course id, and whether you’d like to remove them from the course. To get the course id, it’s helpful to use the learndash_get_course_id() function. This allows you to…

Read More