[memb_learndash_course_enroll]

Version Added 2.42

Summary

Enroll the current user in a LearnDash course.

Shortcode Examples

[memb_learndash_course_enroll course_id="123"]

Shortcode Parameters

course_id:  The ID# of the course to enroll the user in.

Description

In addition to the Memberium access controls, LearnDash has a concept referred to as enrollment.  Memberium controls visibility to the course page, but LearnDash enrollment controls whether or not any given member (or student) is enrolled in that course.

The [memb_learndash_course_enroll] shortcode is a tool you can use to enroll a student in a course that they have access to.  This is most useful when combined with conditional shortcodes like [memb_has_any_tag] or [memb_has_all_tags], but can be used  in any way you wish.  This shortcode produces no output and normally operate invisibly.

Memberium also has a feature called Tag Based Auto-Enrollment, which automates enrolling and un-enrolling students at the time of login based on their tags.  Auto-Enrollment is usually preferred over shortcode enrollment.

If you attempt to use this shortcode and specify a course that does not exist, this shortcode will output an error message.

If you attempt to use this shortcode without installing and activating LearnDash, then this shortcode will output an error message.

You can learn more about LearnDash here.

Shortcode Attributes

Conditional: No (?)
Nestable: No (?)
Accepts formatting: No (?)
Capturable: No (?)

FAQ

Can I enroll a member who is already enrolled in a course?

Yes, it will not cause any harm or error to re-enroll a student who is alreadyenrolled.