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::delete_enrollment_postmeta( int $product_id, string $trigger = null )

Remove student enrollment postmeta for a given product.


Parameters Parameters

$product_id

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

$trigger

(string) (Optional) String the reason for enrollment. Default null

Default value: null


Top ↑

Return Return

(boolean) Whether or not the enrollment records have been succesfully removed.


Top ↑

Source Source

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

	 * @since 7.5.0
	 *
	 * @see LLMS_Student->mark_favorite()
	 *
	 * @param int $object_id WP Post ID of the object to mark/unmark as favorite.
	 * @return bool
	 */
	private function insert_favorite_postmeta( $object_id ) {

		$update = llms_update_user_postmeta( $this->get_id(), $object_id, '_favorite', true );

		// Returns boolean if postmeta update is successful.
		return is_array( $update ) ? false : true;


Top ↑

Changelog Changelog

Changelog
Version Description
3.33.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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