Browse: Home / Functions /


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 #


(int|null) (Optional) User ID.

Default value: null


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

Default value: null


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

Default value: false


(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 #

Version Description
2.1.0 Introduced.