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

Start free trial

LearnDash Delete Achievement

learndash/delete-achievement deletes an achievement badge. It requires confirm_title matching the current title.

What happens next depends entirely on force.

Before you run it

Permanently deleting a badge (force=true) also erases every award of that badge for every learner on the site and reduces all their points totals. That cascade is irreversible, so it requires confirm_data_loss=true on top of the title. Trashing (force=false, the default) does not trigger the cascade and is reversible — prefer it.

At a glance

Abilitylearndash/delete-achievement
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Achievements
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyDestructive — permanent deletion erases every award of the badge for every learner. Requires confirm_title, plus confirm_data_loss for the permanent path.
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

Trashing removes the badge from circulation. It stops being awardable, existing awards survive, learners keep their points, and restoring it puts everything back.

Permanent deletion erases every award of that badge across the whole site and reduces every affected learner’s points total accordingly.

That is a site-wide data change triggered by what looks like removing one definition, which is why it needs a second confirmation of its own.

It is also one of the few operations here whose effects are visible to learners immediately: a badge disappears from their profile and their points go down, with no explanation.

To remove a badge from one learner instead, learndash/revoke-achievement takes per-award IDs and affects only them.

Not idempotent.

Input

NameTypeRequiredWhat it is
achievement_idintegerYesThe achievement.
confirm_titlestringYesMust exactly match the current title on the live record.
confirm_data_lossbooleanFor permanent deletionAcknowledges that every award across the site is erased.
forcebooleanNoTrue deletes permanently and cascades; false trashes.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
achievement_idintegerThe achievement.
awards_erasedintegerHow many awards were destroyed, on permanent deletion.
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:

Retire that badge.

It resolves to one call:

{
  "ability": "learndash/delete-achievement",
  "parameters": {
    "achievement_id": 900,
    "confirm_title": "Onboarding complete"
  }
}

Worth knowing

  • Trashing stops the badge without touching anybody’s awards.
  • Permanent deletion erases awards site-wide and lowers points totals.
  • Learners see the change immediately and unexplained.
  • Revoking affects one learner instead.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading