Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Student::remove_membership_level( int $membership_id, string $status = 'expired', boolean $delete = false )

Remove a student from a membership level.

Parameters Parameters


(int) (Required) WP Post ID of the membership.


(string) (Optional) Status to update the removal to. Default is expired.

Default value: 'expired'


(boolean) (Optional) Status to update the removal to. Default is false.

Default value: false

Top ↑

Return Return


Top ↑

Source Source

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

					// If not switch return to false but keep looking.
				} else {
					$ret = false;

		return apply_filters( 'llms_is_user_enrolled', $ret, $this, $product_ids, $relation, $use_cache );


	 * Mark a lesson, section, course, or track complete for the given user.
	 * @param  int    $object_id    WP Post ID of the lesson, section, course, or track
	 * @param  string $object_type  object type [lesson|section|course|track]
	 * @param  string $trigger      String describing the reason for marking complete
	 * @return bool
	 * @see    llms_mark_complete() calls this function without having to instantiate the LLMS_Student class first
	 * @since    3.3.1
	 * @version  3.17.1
	public function mark_complete( $object_id, $object_type, $trigger = 'unspecified' ) {

		// Short circuit if it's already completed.
		if ( $this->is_complete( $object_id, $object_type ) ) {
			return true;

		return $this->update_completion_status( 'complete', $object_id, $object_type, $trigger );


Top ↑

Changelog Changelog

Version Description
3.7.5 Unknown.
3.36.2 Added the $delete parameter, that will allow related courses enrollments data deletion.
2.7 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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