Browse: Home / Functions /

learndash_get_user_course_points

learndash_get_user_course_points( int $user_id )

Gets the course points for a user.


Description #

The course points calculation is based on all completed courses by the user. From these completed courses we get any with assigned course points into a total. Then we add the optional ‘course_points’ user meta value if present. This is a value the admin can set to help increase the student’s point total.

The calculated course points plus user meta course points are added together and returned.


Parameters #

$user_id

(int) (Optional) User ID. Default 0.


Return #

(mixed) User course points.


Source #

File: includes/ld-users.php


Changelog #

Changelog
Version Description
2.4.0 Introduced.