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