learndash_user_get_enrolled_courses( int $user_id, array $course_query_args = array(), boolean $bypass_transient = false )
Gets the list of all courses enrolled by the user.
Description #
Parameters #
- $user_id
-
(int) (Optional) User ID. Default 0.
- $course_query_args
-
(array) (Optional) An array of
WP_Queryarguments.Default value: array()
- $bypass_transient
-
(boolean) (Optional) Whether to bypass the transient cache or not.
Default value: false
Return #
(array) An array of courses enrolled by user.
Source #
File: includes/ld-users.php
Changelog #
| Version | Description |
|---|---|
| 2.2.1 | Introduced. |
Related #
Namespace #
@package #
Uses #
| Uses | Description |
|---|---|
| includes/course/ld-course-functions.php: learndash_get_posts_by_price_type () |
Get Courses/Groups by Price Type. |
| includes/course/ld-course-functions.php: learndash_can_user_autoenroll_courses () |
Check if user can auto-enroll in courses. |
| includes/class-ldlms-transients.php: LDLMS_Transients::get () |
Get a Transient |
| includes/class-ldlms-transients.php: LDLMS_Transients::set () |
Utility function to interface with WP set_transient function. This function allow for filtering if to actually write the transient. |
| includes/ld-users.php: learndash_get_user_course_access_list () |
Gets the list of course IDs accessible by the user. |
| includes/ld-users.php: learndash_get_user_courses_from_meta () |
Gets all courses for the user via the user meta ‘course_XXX_access_from’. |
| includes/ld-users.php: learndash_get_user_groups_courses_ids () |
Gets all courses accessible by the user’s groups. |
| includes/course/ld-course-functions.php: learndash_use_legacy_course_access_list () |
Checks whether to use the legacy course access list. |
Used By #
| Used By | Description |
|---|---|
| includes/rest-api/v2/class-ld-rest-users-courses-controller.php: LD_REST_Users_Courses_Controller_V2::update_user_course () |
Update a specific user course. |
| src/Core/Modules/Payments/Gateways/Paypal_Standard/Migration/Subscriptions.php: Subscriptions::get_user_subscribed_product_ids () |
Gets the user subscribed product IDs. |
| includes/reports/templates/reporting-filters/courses/ld-propanel-reporting-filter-course.php: LearnDash_ProPanel_Reporting_Filter_Courses::filter_activity_args () |
Merges selected courses into activity query arguments. |
| includes/reports/templates/reporting-filters/courses/ld-propanel-reporting-filter-course.php: LearnDash_ProPanel_Reporting_Filter_Courses::filter_search () |
Courses search. |
| includes/rest-api/v2/class-ld-rest-users-courses-controller.php: LD_REST_Users_Courses_Controller_V2::get_user_courses () |
Returns the user courses. |
| includes/rest-api/v2/class-ld-rest-lessons-controller.php: LD_REST_Lessons_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single Lesson. |
| includes/rest-api/v2/class-ld-rest-quizzes-controller.php: LD_REST_Quizzes_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single Quiz. |
| includes/rest-api/v2/class-ld-rest-topics-controller.php: LD_REST_Topics_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single Topic. |
| includes/admin/classes-posts-listings/class-learndash-admin-courses-listing.php: Learndash_Admin_Courses_Listing::listing_table_query_vars_filter_courses () |
Listing table query vars |
| includes/admin/classes-posts-listings/class-learndash-admin-users-listing.php: Learndash_Admin_Users_Listing::show_column_user_groups_courses () |
Show the User Courses column. |
| includes/class-ld-search.php: LearnDash_Search::pre_get_posts () |
Filter WP_Query instance to add LD search logic. |
| includes/ld-certificates.php: learndash_get_certificate_count () |
Gets the certificate count for a user. |
| themes/ld30/includes/helpers.php: learndash_get_user_stats () |
Gets the user statistics. |
| includes/ld-users.php: learndash_user_set_enrolled_courses () |
Enrolls the user in new courses. |
| includes/ld-users.php: learndash_get_user_course_access_list () |
Gets the list of course IDs accessible by the user. |
| includes/deprecated/5.0.0/functions.php: learndash_report_user_courses_progress () |
Gets the users course progress for the report. |
| includes/ld-reports.php: learndash_reports_get_activity () |
Queries the user activity for the report. |
| includes/rest-api/v1/class-ld-rest-lessons-controller.php: LD_REST_Lessons_Controller_V1::get_item_permissions_check () |
Check Single Lesson Read Permissions. |
| includes/rest-api/v1/class-ld-rest-users-courses-controller.php: LD_REST_Users_Courses_Controller_V1::get_user_courses () |
Get User Courses. |
| includes/rest-api/v1/class-ld-rest-courses-steps-controller.php: LD_REST_Courses_Steps_Controller_V1::get_course_steps_permissions_check () |
Course steps permissions check |
| includes/rest-api/v1/class-ld-rest-topics-controller.php: LD_REST_Topics_Controller_V1::get_item_permissions_check () |
Check Single Topic Read Permissions. |
| includes/shortcodes/ld_student.php: learndash_student_check_shortcode () |
Builds the |
| includes/shortcodes/ld_visitor.php: learndash_visitor_check_shortcode () |
Builds the |
| includes/shortcodes/ld_course_list.php: ld_course_list () |
Builds the |
| includes/admin/class-learndash-admin-user-profile-edit.php: Learndash_Admin_User_Profile_Edit::show_user_courses () |
Show User Enrolled Courses Binary Selector. |