How to Get a Connected Course by Lesson ID

[et_pb_section fb_built=”1″ _builder_version=”4.3.4″ custom_margin=”0px||0px||false|false” custom_padding=”0px||0px||false|false”][et_pb_row _builder_version=”4.3.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” width=”100%” custom_padding=”0px|0px|0px|0px|false|false”][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text _builder_version=”4.3.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” hover_enabled=”0″]

Lessons are connected to courses by storing the course ID in each lesson’s post meta using the key “wpc-connected-lesson-to-course.”

[/et_pb_text][et_pb_dmb_code_snippet code=”JGxlc3Nvbl9pZCA9IDI5OwokY291cnNlX2lkID0gZ2V0X3Bvc3RfbWV0YSggJGxlc3Nvbl9pZCwgJ3dwYy1jb25uZWN0ZWQtbGVzc29uLXRvLWNvdXJzZScsIHRydWUgKTs=” language=”php” style=”github” linenums=”on” _builder_version=”4.3.4″ hover_enabled=”0″]JGxlc3Nvbl9pZCA9IDI5OwokY291cnNlX2lkID0gZ2V0X3Bvc3RfbWV0YSggJGxlc3Nvbl9pZCwgJ3dwYy1jb25uZWN0ZWQtbGVzc29uLXRvLWNvdXJzZScsIHRydWUgKTs=[/et_pb_dmb_code_snippet][/et_pb_column][/et_pb_row][/et_pb_section]