learndash_get_courses_for_step( int $step_id, boolean $return_flat_array = false )
Gets the list of courses associated with a step.
Description Description
Parameters Parameters
- $step_id
-
(Optional) The ID of the step to get course list. Default 0.
- $return_flat_array
-
(Optional) Whether to return single dimensional array.
Default value: false
Return Return
(array) An array of course list for a step. Returns an multidimesional array of course list sorted in primary and secondary course list if the $return_flat_array parameter is false.
Source Source
File: includes/course/ld-course-steps-functions.php
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |