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
| Ability | learndash/detach-step |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Course Structure |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI 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
| Name | Type | Required | What it is |
|---|---|---|---|
course_id | integer | Yes | The course to remove it from. |
step_id | integer | Yes | The step. |
What comes back
| Name | Type | What it is |
|---|---|---|
step_id | integer | The step detached. |
nested_removed | integer | How many nested steps left the outline with it. |
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:
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
- LearnDash Attach Step — put it somewhere else
- LearnDash Delete Lesson — when it should not exist at all
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category