LLMS_REST_Enrollments_Controller::check_read_permission( mixed $enrollment )

Checks if an enrollment can be read.

Parameters Parameters


(mixed) (Required) The enrollment object.

Top ↑

Return Return

(bool) Whether the enrollment can be read.

Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-enrollments-controller.php

	protected function check_update_permission() {
		return current_user_can( 'enroll' ) && current_user_can( 'unenroll' );

	 * Checks if an enrollment can be deleted
	 * @since 1.0.0-beta.1
	 * @return bool Whether the enrollment can be deleted.
	protected function check_delete_permission() {
		return current_user_can( 'unenroll' );

Top ↑

Changelog Changelog

Version Description
1.0.0-beta.4 The single enrollment can be read only by who can view the enrollment's student.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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