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

Start free trial

LearnDash Delete Group

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

Abilitylearndash/delete-group
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Groups
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyDestructive — every member loses the access the group was granting. Requires confirm_title.
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI 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

NameTypeRequiredWhat it is
group_idintegerYesThe group.
confirm_titlestringYesMust exactly match the current title on the live record.
forcebooleanNoTrue deletes permanently; false trashes.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
group_idintegerThe group.
members_affectedintegerHow many learners lost access.
courses_affectedarrayWhich courses they lost.
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:

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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading