learndash/get-lesson fetches a single lesson: its post fields and its full LearnDash settings.
Four of those settings change what learners experience rather than what they read.
At a glance
| Ability | learndash/get-lesson |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Lessons, Topics & Quizzes |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
The release schedule is drip-feed: a lesson can be visible a number of days after enrolment, or on a specific date. Drip-fed lessons are the usual answer to “the learner says the course is empty” — they are enrolled and nothing has been released yet.
Days-after is computed from the enrolment date, which learndash/set-enrollment-date can change — so backdating an enrolment releases lessons immediately.
The sample flag marks a lesson as a free preview, readable without enrolment. That is a marketing setting with an access consequence, and it is easy to set on the wrong lesson.
Assignment upload rules decide whether the lesson requires an uploaded file and whether it carries points. A lesson requiring assignment approval cannot be completed until somebody approves it, which is a common blocker.
Video progression forces the learner to watch before proceeding, and is the other common blocker.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
lesson_id | integer | Yes | The lesson. |
What comes back
| Name | Type | What it is |
|---|---|---|
lesson | object | Post fields and the full LearnDash settings object. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Why can this learner not see the lesson?
It resolves to one call:
{
"ability": "learndash/get-lesson",
"parameters": {
"lesson_id": 520
}
}Worth knowing
- Drip-feed explains “the course looks empty” more often than anything else.
- Days-after is computed from the enrolment date.
- Assignment approval and video progression are the two usual completion blockers.
- Read-only.
Related abilities
- LearnDash Manage Lesson — change the settings
- LearnDash Set Enrollment Date — what drip-feed counts from
- LearnDash Mark Step Complete — which reports the blockers
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category