Point System
Actions
Dynamic Hook: do_action( "stm_lms_score_charge_{$action_id}", $user_id, $action_id, $action['score'], time() )
This dynamic action hook is triggered whenever a point-related action occurs. Depending on the action type ($action_id), the user can be awarded points.
Available $action_id values:
user_registeredcourse_purchasedassignment_passedcertificate_receivedquiz_passedperfect_quizlesson_passedgroup_joinedfriends_friendship_acceptedcourse_bought
Parameters:
$user_id(integer) — The ID of the user receiving points.$action_id(string) — The action identifier.$time(integer) — The timestamp when the action occurred.
Example: stm_lms_score_charge_course_purchased
Description: Triggered when a course is purchased. Allows developers to modify or add to the points awarded for this specific action.
Example usage:
Filters
stm_lms_display_points
Description: Filters the way user points are displayed. You can modify the default points output and return a custom format.
Parameters:
$points(string) — The current points string.
Example usage:
Explanation: This example overrides the points display for a specific user (ID = 1) and shows 4.5 GPA instead of the regular score.
Last updated
Was this helpful?

