elementor/delete-custom-code trashes an Elementor Pro Custom Code snippet by default, or permanently deletes it when force is set.
Requires Elementor Pro. Without it the ability reports that plainly rather than failing obscurely.
Before you run it
Trashing stops the snippet running immediately, which is the point and is also how analytics, conversion tracking or a third-party integration stops working without anybody connecting the two events. Permanent deletion removes the code, which is frequently the only copy on the site — a vendor tag pasted in years ago exists nowhere else.
At a glance
| Ability | elementor/delete-custom-code |
| Toolset | Elementor — toolset/elementor |
| Group | Elementor › Custom Code |
| Requires | Elementor, active on the site |
| Capability | manage_options |
| Safety | Destructive — trashes by default, deletes permanently with force. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Trashing is reversible and stops the code running, which makes it the right way to test whether a snippet is causing something. Restore it and the behaviour returns.
What it also does is stop whatever the snippet was for. Analytics stop recording, conversion tracking stops firing, an integration stops receiving events — and none of those produce an error on this site. The absence shows up days later in somebody else’s dashboard.
So read the snippet before removing it. Knowing what it does is the difference between a deliberate removal and a silent outage.
Permanent deletion removes the code body, and for a vendor tag pasted in years ago that is usually the only copy anywhere. Take a copy first.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
code_id | integer | Yes | The snippet to remove. |
force | boolean | No | Permanently delete instead of trashing. |
What comes back
| Name | Type | What it is |
|---|---|---|
code_id | integer | The snippet. |
deleted | string | Whether it was trashed or deleted permanently. |
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:
Remove the old tracking pixel snippet.
It resolves to one call:
{
"ability": "elementor/delete-custom-code",
"parameters": {
"code_id": 880
}
}Worth knowing
- Whatever the snippet was for stops, silently, on this site.
- Read it before removing it.
- Permanent deletion removes the only copy of a pasted vendor tag.
- Trashing is reversible and is the right way to test.
Related abilities
- Get Elementor Pro Custom Code — read and copy it first
- Update Elementor Pro Custom Code — draft it instead of deleting
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category