llms_delete_student_enrollment( int $user_id, int $product_id, string $trigger = 'any' )
Delete LifterLMS Student’s Enrollment record related to a given product.
Contents
Description Description
See also See also
- `LLMS_Student->delete_enrollment()`: the class method wrapped by this function.
Parameters Parameters
- $user_id
-
(int) (Required) WP User ID.
- $product_id
-
(int) (Required) WP Post ID of the Course or Membership.
- $trigger
-
(string) (Optional) Only delete the student enrollment if the original enrollment trigger matches the submitted value. Passing "any" will remove regardless of enrollment trigger.
Default value: 'any'
Return Return
(boolean) Whether or not the enrollment records have been successfully removed.
Source Source
File: includes/functions/llms.functions.person.php
function llms_delete_student_enrollment( $user_id, $product_id, $trigger = 'any' ) { $student = new LLMS_Student( $user_id ); return $student->delete_enrollment( $product_id, $trigger ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.33.0 | Introduced. |