learndash_get_legacy_course_id( WP_Post|int|null $id = null )

Gets the legacy course ID for a resource.

Description #

Determine the type of ID is being passed in. Should be the ID of anything that belongs to a course (Lesson, Topic, Quiz, etc).

Parameters #


(WP_Post|int|null) (Optional) ID of the resource.

Default value: null

Return #

(string) ID of the course.

Source #

File: includes/course/ld-course-functions.php

Changelog #

Version Description
2.1.0 Introduced.