30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

LearnDash Get Lesson

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

Abilitylearndash/get-lesson
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Lessons, Topics & Quizzes
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
lesson_idintegerYesThe lesson.

What comes back

NameTypeWhat it is
lessonobjectPost fields and the full LearnDash settings object.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading