[memb_learndash_is_enrolled]

Description

Checks the user's enrolled-course list (ld_get_mycourses) for the given course ID. The not attribute inverts the result. Logged-out visitors and non-course IDs render nothing.

Shortcode Examples

[memb_learndash_is_enrolled id="123"]Course welcome content[/memb_learndash_is_enrolled]

Not-yet-enrolled upsell:

[memb_learndash_is_enrolled id="123" not="true"]Enroll to unlock this lesson[/memb_learndash_is_enrolled]

Shortcode Parameters

id

Course post ID (sfwd-courses). Required. Default: 0.

not

Inverts the result. Default: false.

Shortcode Attributes

Attribute Value
Conditional Yes
Nestable No
Accepts formatting Yes