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

Add a new status record to the user postmeta table for a specific product

Parameters Parameters


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


(string) (Optional) string describing the new status

Default value: ''


(string) (Optional) String describing the reason for enrollment (optional)

Default value: null

Top ↑

Return Return


Top ↑

Source Source

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

	private function insert_status_postmeta( $product_id, $status = '', $trigger = null ) {

		$update = llms_update_user_postmeta( $this->get_id(), $product_id, '_status', $status, false );

		if ( $update && $trigger ) {
			$update = llms_update_user_postmeta( $this->get_id(), $product_id, '_enrollment_trigger', $trigger, false );

		return $update;


Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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