snippets/clear-snippet-errors clears the error WPCode recorded against a snippet, or against every snippet if you give no ID.
It clears the record. It does not fix anything.
At a glance
| Ability | snippets/clear-snippet-errors |
| Toolset | WPCode — toolset/wpcode |
| Group | WPCode › Diagnostics |
| Requires | WPCode, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
Order matters
Clearing an error before fixing the code loses the only description of what went wrong. The snippet is still broken, it is still inactive, and now nothing says why.
The useful sequence is the other way round: fix the code with snippets/update-snippet, clear the error, then activate. Doing it in that order means a fresh error afterwards is unambiguously about the new code, not a leftover from before.
Clearing every error at once is for the situation where a site has accumulated stale records from snippets that were long since fixed or deleted — a tidy-up, not a repair.
Idempotent, and nothing is reactivated as a side effect. Activation stays a deliberate call.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | No | Snippet ID. Omit to clear the recorded error for every snippet. |
What comes back
| Name | Type | What it is |
|---|---|---|
cleared | integer | How many error records were cleared. |
cleared_ids | array | The snippet IDs that had an error cleared. |
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:
I fixed snippet 88 — clear its error.
It resolves to one call:
{
"ability": "snippets/clear-snippet-errors",
"parameters": {
"id": 88
}
}Worth knowing
- Does not fix the code and does not reactivate anything.
- Clear after fixing, never before.
- Omitting the ID clears every record on the site.
- Idempotent.
Related abilities
- List Snippet Errors — read them before clearing
- Activate Code Snippet — the last step of the repair
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category