learndash_course_grid_count_students( int $post_id )
Counts enrolled students for a LearnDash course or group.
Description #
This function retrieves the number of users enrolled in a specific course or group. It uses caching to improve performance for repeated calls.
Parameters #
- $post_id
-
(int) (Required) The ID of the course or group.
Return #
(int|bool) The number of enrolled students, or false if not a valid course/group.
Source #
Changelog #
Version | Description |
---|---|
4.21.4 | Introduced. |