[memb_learndash_course_enroll]
Description
Action shortcode: calls ld_update_course_access() to add the user
to the course. Only operates on singular pages, for logged-in users,
when LearnDash is loaded and the target is a real sfwd-courses
post. Any other condition is a silent no-op.
Returns no output.
Shortcode Examples
[memb_learndash_course_enroll course_id="123"]
Enroll a specific user:
[memb_learndash_course_enroll course_id="123" user_id="42"]
Shortcode Parameters
course_id
Course post ID. Required. Default: 0.
user_id
User to enroll. Default: 0 (current user).
Shortcode Attributes
| Attribute | Value |
|---|---|
| Conditional | No |
| Nestable | No |
| Accepts formatting | No |