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

Start free trial

LearnDash Detach Step

learndash/detach-step removes a lesson, topic or quiz from a course outline.

The post itself is not deleted. It stays in the library and can be attached elsewhere.

At a glance

Abilitylearndash/detach-step
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Course Structure
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Pro 0.9.16 and later

How it works

This is the ability the delete pages keep pointing at. Almost every time somebody wants a lesson “out of the course”, detaching is what they mean — the content is fine, it just does not belong in this outline any more.

Deleting is for content that should not exist at all, and it affects every course the step was in.

Detaching a lesson also removes the topics and quizzes nested under it from this course’s outline, and the response reports how many. They are not deleted either; they simply leave this outline along with their parent.

A step detached from its primary course keeps existing but loses the course LearnDash used for breadcrumbs and certificate resolution — which is worth re-establishing with learndash/attach-step elsewhere if the step is still in use.

Idempotent.

Input

NameTypeRequiredWhat it is
course_idintegerYesThe course to remove it from.
step_idintegerYesThe step.

What comes back

NameTypeWhat it is
step_idintegerThe step detached.
nested_removedintegerHow many nested steps left the outline with it.
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:

Take that lesson out of this course but keep it.

It resolves to one call:

{
  "ability": "learndash/detach-step",
  "parameters": {
    "course_id": 412,
    "step_id": 520
  }
}

Worth knowing

  • Nothing is deleted. The step stays in the library.
  • Detaching a lesson takes its nested topics and quizzes out of this outline.
  • A step detached from its primary course loses that resolution.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading