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

Start free trial

LearnDash Get Course

learndash/get-course fetches a single course: its post fields, its full LearnDash settings, and how many steps it contains.

The settings are where a course’s behaviour actually lives.

At a glance

Abilitylearndash/get-course
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Courses
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

Access mode is the setting that decides everything about who can take the course. open needs no enrolment at all, free needs an account, paynow and subscribe need a purchase, and closed means enrolment is granted rather than bought.

A learner reporting they cannot access a course is usually looking at one of those, and learndash/get-access-info resolves it for a specific person.

Prerequisites and lesson progression are the other two behaviour switches. Progression disabled lets learners skip ahead; prerequisites gate the course behind another one, which is a common cause of “I am enrolled and it says I cannot start”.

The certificate setting names the template issued on completion, and a course with no certificate issues none however complete the learner gets.

The step count is a summary. learndash/get-course-structure returns the tree.

Input

NameTypeRequiredWhat it is
course_idintegerYesThe course.

What comes back

NameTypeWhat it is
courseobjectPost fields and the full LearnDash settings object.
step_countintegerHow many steps the course contains.
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:

How is this course configured?

It resolves to one call:

{
  "ability": "learndash/get-course",
  "parameters": {
    "course_id": 412
  }
}

Worth knowing

  • Access mode decides who can take the course at all.
  • Prerequisites explain “enrolled but cannot start”.
  • No certificate setting means no certificate, however complete.
  • Read-only.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading