Warning: This method has been deprecated. Use LLMS_Lesson::set( ‘parent_course’, $course_id ), via LLMS_Post_Model::set(), instead.

LLMS_Lesson::set_parent_course( int $course_id )

Set parent course


Description Description

Sets parent course in database


Top ↑

Parameters Parameters

$course_id

(int) (Required) The WP Post ID of the course to be set as parent.


Top ↑

Return Return

(int|bool) If meta didn't exist returns the meta_id else t/f if update success. Returns false if the course id value was already set.


Top ↑

Source Source

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

	public function set_parent_course( $course_id ) {

		llms_deprecated_function( __METHOD__, '5.7.0', __CLASS__ . '::set( \'parent_course\', $course_id )' );

		return update_post_meta( $this->id, '_llms_parent_course', $course_id );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.7.0 Use LLMS_Lesson::set( 'parent_course', $course_id ), via LLMS_Post_Model::set(), instead.
Unknown Introduced. Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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