Browse: Home / Functions /

learndash_can_complete_step

learndash_can_complete_step( int $user_id,  int $step_id,  int $course_id,  bool $ignore_lesson_timer = false )

Check if the user can complete the current step.


Description #

This is mostly used before auto-completing a parent step like a quiz parent lesson.


Parameters #

$user_id

(int) (Required) User ID.

$step_id

(int) (Required) Course Step ID.

$course_id

(int) (Required) Course ID.

$ignore_lesson_timer

(bool) (Optional) Whether to ignore the lesson timer. @since 4.0.3

Default value: false


Return #

(bool) True if can complete.


Source #

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


Changelog #

Changelog
Version Description
4.0.3 Added $ignore_lesson_timer parameter.
3.2.3 Introduced.