Black Friday sale ends December 2nd Get 30% off now
Browse: Home / Functions /

learndash_course_get_step_completion_data

learndash_course_get_step_completion_data( int $step_id,  int $course_id,  int $user_id,  bool $should_preserve_transient = false )

Returns the step completion data when a step is completed by a user.


Description #


Parameters #

$step_id

(int) (Required) Step post ID.

$course_id

(int) (Required) Course ID.

$user_id

(int) (Required) User ID.

$should_preserve_transient

(bool) (Optional) If true, it will keep the transient data that affects the result, so it can be reused in the next call.

Default value: false


Return #

(array{) is_course_completed: bool, is_course_completion_url: bool, next_step_id: int, next_step_url: string, }


Source #

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


Changelog #

Changelog
Version Description
4.21.3 Introduced.