do_action( "llms_user_earned_{$type}", int $user_id, int $generated_id, string|int|null $related_id, int|null $engagement_id )

Action run after a student has successfully earned an engagement.


Description Description

The dynamic portion of this hook, {$type}, refers to the engagement type, either "achievement" or "certificate".


Top ↑

Parameters Parameters

$user_id

(int) WP_User ID of the student who earned the engagement.

$generated_id

(int) WP_Post ID of the generated engagement post.

$related_id

(string|int|null) WP_Post ID of the related post triggering generation, an empty string (in the event of a user registration trigger) or null if not supplied.

$engagement_id

(int|null) WP_Post ID of the engagement post used to configure engagement triggering.


Top ↑

Source Source

File: includes/class-llms-engagement-handler.php

View on GitHub



Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Added the $engagement_id parameter.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.