LLMS_Student::unenroll( int $product_id, string $trigger = 'any', string $new_status = 'expired' )

Remove a student from a LifterLMS course or membership


Description Description

See also See also


Top ↑

Parameters Parameters

$product_id

(Required) WordPress Post ID of the course or membership.

$trigger

(Optional) Only remove the student if the original enrollment trigger matches the submitted value. Passing any will remove regardless of enrollment trigger.

Default value: 'any'

$new_status

(Optional) the value to update the new status with after removal is complete.

Default value: 'expired'


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/models/model.llms.student.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
3.37.9 Update to accommodate custom post type enrollments added through new filters. Marked action llms_user_removed_from_membership_level as deprecated, use llms_user_removed_from_membership instead.
3.26.0 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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