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

Start free trial

Delete Elementor Pro Custom Code

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

Abilityelementor/delete-custom-code
ToolsetElementor — toolset/elementor
GroupElementor › Custom Code
RequiresElementor, active on the site
Capabilitymanage_options
SafetyDestructive — trashes by default, deletes permanently with force.
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI 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

NameTypeRequiredWhat it is
code_idintegerYesThe snippet to remove.
forcebooleanNoPermanently delete instead of trashing.

What comes back

NameTypeWhat it is
code_idintegerThe snippet.
deletedstringWhether it was trashed or deleted permanently.
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:

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 the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading