learndash/delete-question permanently deletes a question and its linked ProQuiz record. It requires confirm_title matching the current title.
Unlike every other deletion in this suite, there is no trash option.
Before you run it
There is no trash step here, and that is deliberate: a trashed question stays in the quiz’s question map and leaves the quiz pointing at something that is no longer there — which breaks the quiz for every learner rather than merely removing a question. So this deletes outright, and it is irreversible. Recorded learner attempts that referenced the question are not removed.
At a glance
| Ability | learndash/delete-question |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Questions |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Destructive and irreversible — there is no trash step, by design. Requires confirm_title. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
Trashing a question would leave it in the quiz’s question map while making the post unavailable — so the quiz would reference a question that cannot be loaded, and learners would meet an error rather than a shorter quiz.
Deleting outright removes it from the map as well, which is the only clean outcome.
That means the operation is irreversible, and the confirmation is the only gate.
It goes through LearnDash’s REST controller for the same reason learndash/manage-question does: both halves of the record need cleaning up, and only the controller does both. LearnDash’s REST API therefore has to be enabled.
Recorded learner attempts that referenced this question are not removed. Past attempt records keep their scores, which is right — an attempt is a historical fact — and it does mean reporting can reference a question that no longer exists.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
question_id | integer | Yes | The question. |
confirm_title | string | Yes | Must exactly match the current title on the live record. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
question_id | integer | The question deleted. |
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:
Remove that question from the quiz.
It resolves to one call:
{
"ability": "learndash/delete-question",
"parameters": {
"question_id": 660,
"confirm_title": "Which shortcut opens the command palette?"
}
}Worth knowing
- No trash, because a trashed question breaks the quiz for everyone.
- Irreversible — the confirmation is the only gate.
- Requires LearnDash’s REST API.
- Past attempt records survive and may reference it.
Related abilities
- LearnDash List Questions — confirm which question
- LearnDash Manage Question — edit it instead
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category