0

I found the "learndash_mark_complete" but it shows a button to complete. I want to complete it programatically for a few users in a few courses

Yash Ranka
  • 13
  • 3

1 Answers1

1

I believe you're looking for the learndash_process_mark_complete() function, which according to LearnDash "Updates the user meta with completion status for any resource."

It accepts the following arguments:

  • $user_id - User ID. Default null.
  • $postid - Optional. The ID of the resource like course, lesson, topic, etc.
  • $onlycalculate - Optional. Whether to mark the resource as complete or just calculate it.
  • $course_id - Optional. Course ID.