LLMS_Privacy::get_student_enrollments( LLMS_Student $student, int $page, string $post_type )

Retrieve student course & membership enrollment data


Parameters Parameters

$student

(LLMS_Student) (Required) Student object.

$page

(int) (Required) Page number.

$post_type

(string) (Required) WP Post type (course/membership).


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/privacy/class-llms-privacy.php

	protected static function get_student_enrollments( $student, $page, $post_type ) {

		$limit = 250;

		$enrollments = $student->get_enrollments(
			$post_type,
			array(
				'limit' => $limit,
				'skip'  => ( $page - 1 ) * $limit,
			)
		);

		return array(
			'done'    => ( ! $enrollments['more'] ),
			'results' => $enrollments['results'],
		);

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.18.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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