LLMS_Lesson::get_course()

Retrieve an instance of LLMS_Course for the element’s parent course


Return Return

(LLMS_Course|null) Returns null if the lesson is not attached to any courses.


Top ↑

Source Source

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

	public function get_course() {

		$course_id = $this->get( 'parent_course' );
		if ( ! $course_id ) {
			return null;
		}

		return llms_get_post( $course_id );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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