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

Start free trial

LearnDash Delete Certificate Template

learndash/delete-certificate-template permanently deletes or trashes a certificate template. It requires confirm_title matching the current title.

What it leaves behind is a silent failure.

Before you run it

If any course, quiz or group still uses this template they are left with a dangling reference, and their learners silently stop getting certificates — LearnDash neither cleans this up nor warns about it. That case requires confirm_orphan_references=true, and the response lists exactly what was affected. Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.

At a glance

Abilitylearndash/delete-certificate-template
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Certificates
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyDestructive — anything still using it is left with a dangling reference. Requires confirm_title, and confirm_orphan_references when it is in use.
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 course pointing at a deleted template does not fall back to a default and does not error. It simply stops issuing certificates, and nothing on the course, in the admin or in any report says so.

The learner finishes, expects a certificate, and there is none. That is discovered by the learner rather than by anybody administering the site.

So the extra confirmation exists for the in-use case, and the response lists exactly which courses, quizzes and groups were affected — which is the list to work through afterwards.

learndash/get-certificate-template shows the same list beforehand.

Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.

A trashed template produces the same dangling reference, so trashing is reversible rather than safe — it buys the ability to undo, not the absence of consequence.

Not idempotent.

Input

NameTypeRequiredWhat it is
certificate_idintegerYesThe template.
confirm_titlestringYesMust exactly match the current title on the live record.
confirm_orphan_referencesbooleanWhen anything still uses itAcknowledges that those courses, quizzes and groups stop issuing certificates.
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
certificate_idintegerThe template.
orphaned_referencesarrayWhat was left pointing at it.
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 unused certificate template.

It resolves to one call:

{
  "ability": "learndash/delete-certificate-template",
  "parameters": {
    "certificate_id": 810,
    "confirm_title": "Course completion certificate"
  }
}

Worth knowing

  • A dangling reference stops certificates silently. There is no fallback and no error.
  • The learner discovers it, not the site owner.
  • Trashing leaves the same dangling reference — it is reversible, not harmless.
  • Work through the affected list afterwards.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading