learndash_process_mark_complete

learndash_process_mark_complete( int|null $user_id = null,  int|null $postid = null,  boolean $onlycalculate = false,  int $course_id )

Updates the user meta with completion status for any resource.


Description #


Parameters #

$user_id

(int|null) (Optional) User ID.

Default value: null

$postid

(int|null) (Optional) The ID of the resource like course, lesson, topic, etc.

Default value: null

$onlycalculate

(boolean) (Optional) Whether to mark the resource as complete.

Default value: false

$course_id

(int) (Optional) Course ID. Default 0.


Return #

(boolean) Returns true if the meta is updated successfully otherwise false.


Source #

File: includes/course/ld-course-progress.php


Changelog #

Changelog
Version Description
2.1.0 Introduced.