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
| Ability | learndash/delete-certificate-template |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Certificates |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Destructive — anything still using it is left with a dangling reference. Requires confirm_title, and confirm_orphan_references when it is in use. |
| 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 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
| Name | Type | Required | What it is |
|---|---|---|---|
certificate_id | integer | Yes | The template. |
confirm_title | string | Yes | Must exactly match the current title on the live record. |
confirm_orphan_references | boolean | When anything still uses it | Acknowledges that those courses, quizzes and groups stop issuing certificates. |
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 |
|---|---|---|
certificate_id | integer | The template. |
orphaned_references | array | What was left pointing at it. |
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 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
- LearnDash Get Certificate Template — see what uses it
- LearnDash Manage Course — repoint a course at another template
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category