learndash/delete-group permanently deletes or trashes a group.
The consequence lands on the members rather than on the group.
Before you run it
Every member loses the course access this group was granting them. For a learner with no other enrolment that means losing the course entirely — mid-course, with no notification. The response reports how many members and courses were affected. Their progress is not deleted, so restoring access restores their position. Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.
At a glance
| Ability | learndash/delete-group |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Groups |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Destructive — every member loses the access the group was granting. 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
A group is the mechanism granting its members their courses. Delete it and that grant stops — for everybody at once, mid-course, with nothing telling them.
A learner who also holds a course directly keeps that one. A learner whose only access was the group loses the course outright.
The response reports how many members and courses were affected, and learndash/list-group-members shows the same thing beforehand, which is the better time to know.
Progress is not deleted. Restoring the group, or granting the courses another way, puts every learner back exactly where they were — which makes this recoverable in the sense that matters, provided the group can be restored.
Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
group_id | integer | Yes | The group. |
confirm_title | string | Yes | Must exactly match the current title on the live record. |
force | boolean | No | True deletes permanently; false trashes. |
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 |
|---|---|---|
group_id | integer | The group. |
members_affected | integer | How many learners lost access. |
courses_affected | array | Which courses they lost. |
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:
Delete the finished cohort group.
It resolves to one call:
{
"ability": "learndash/delete-group",
"parameters": {
"group_id": 700,
"confirm_title": "January 2026 cohort"
}
}Worth knowing
- Every member loses the group’s courses, mid-course and unannounced.
- A directly held course survives.
- Progress is not deleted — restoring access restores their position.
- Trashing is reversible.
Related abilities
- LearnDash List Group Members — who this affects
- LearnDash Manage Group Courses — empty it instead
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category