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

Start free trial

Update Elementor Pro Custom Code

elementor/update-custom-code updates fields on an existing Elementor Pro Custom Code snippet.

Requires Elementor Pro. Without it the ability reports that plainly rather than failing obscurely.

At a glance

Abilityelementor/update-custom-code
ToolsetElementor — toolset/elementor
GroupElementor › Custom Code
RequiresElementor, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

A published snippet takes effect on the next request. There is no staging step between the write and the front end, which makes editing a live snippet a live change to what every visitor loads.

The safe pattern for anything substantial is to set the status to draft, make the change, read it back, then publish — three calls rather than one, and no window where broken code is live.

Changing the location is the edit most likely to have consequences beyond the snippet. Moving a script from body end to head makes it render-blocking; moving one the other way can break something that depended on running early.

The code field replaces the body entirely. There is no append, so read it first if you mean to add to it.

Idempotent.

Input

NameTypeRequiredWhat it is
code_idintegerYesThe snippet to change.
titlestringNoA new title.
codestringNoReplacement code. Replaces the body entirely.
locationstringNoA new injection location.
priorityintegerNoA new priority.
statusstringNoA new status.

What comes back

NameTypeWhat it is
code_idintegerThe snippet changed.
updatedarrayWhich fields changed.
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:

Move the analytics snippet to the body end.

It resolves to one call:

{
  "ability": "elementor/update-custom-code",
  "parameters": {
    "code_id": 880,
    "location": "wp_body_end"
  }
}

Worth knowing

  • A published snippet changes for every visitor on the next request.
  • Draft, edit, read back, publish — for anything substantial.
  • The code field replaces; there is no append.
  • Requires Elementor Pro.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading