learndash/list-achievement-triggers lists every trigger an achievement can use: the thing a learner does to earn it.
Read live from the add-on, because the list is extensible.
At a glance
| Ability | learndash/list-achievement-triggers |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Achievements |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
Completing a course, passing a quiz, logging in on consecutive days — those are the built-in ones. A third-party plugin can register its own, and those appear here alongside them.
So there is no fixed list to hard-code against, and a trigger key that works on one site may not exist on another.
Using a trigger the site does not have produces an achievement that never fires, with no error — which is indistinguishable from a badge nobody has earned yet.
Each trigger also determines which scope keys are meaningful. A course-completion trigger scopes by course; a login-streak trigger scopes by nothing. Setting a scope a trigger does not use is silently ignored.
Use one of these keys as the trigger when creating an achievement.
Input
This ability takes no input.
What comes back
| Name | Type | What it is |
|---|---|---|
triggers | array | Each trigger key with what it responds to. |
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:
What can a badge be awarded for?
It resolves to one call:
{
"ability": "learndash/list-achievement-triggers",
"parameters": {}
}Worth knowing
- Extensible — third-party triggers appear here.
- A trigger that does not exist produces a badge that never fires, silently.
- The trigger decides which scope keys are meaningful.
- Requires the LearnDash Achievements add-on.
Related abilities
- LearnDash Manage Achievement — use one
- LearnDash Get Achievement — check an existing badge’s trigger
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category