Hooks

Zapier

10 hooks fired by Zapier: 9 filters and 1 actions across 14 call sites.

10 hooks fired by Zapier: 9 filters and 1 actions across 14 call sites. 11 of the 14 call sites are described by a docblock, at the call or on the constant that names the hook; the rest are listed with their signature and call sites only. Paths are relative to the plugin directory.

http_allowed_safe_ports

Filter · 3 arguments · 1 call site

Filters the ports a zap URL may name, mirroring WordPress core.

This is core's own filter, fired here so the URL is validated against the same list core will apply when the request is actually sent. Adding a port only here would let a URL save and then fail at send time as a transport error, which classifies transient and burns all five retries on a request that can never succeed.

A URL with no explicit port skips the check entirely.

apply_filters( 'http_allowed_safe_ports', [80, 443, 8080], $parts['host'], $url )
  • $ports (int[]) — Allowed ports. Default [80, 443, 8080].
  • $host (string) — Host from the configured URL.
  • $url (string) — The configured URL.

Fired from:

  • packages/Zapier/Addon.php:1441

xpac-forms-after-settings-modal-content

Filter · 3 arguments · 1 call site

Content appended inside a settings panel's item modal.

applyFilters( 'xpac-forms-after-settings-modal-content', [], { value: options, onChange: onUpdate, }, 'xpac-zapier' )

Fired from:

  • assets/packages/zapier/Components/Modal.js:537

xpac_zapier_allow_unsafe_url

Filter · 2 arguments · 5 call sites

Filters whether a zap may be sent to an address WordPress refuses by default.

Consulted twice — here, and again in send(), where returning true is what drops the request from wp_safe_remote_request() to wp_remote_request(). Allowing it in one place only would pass this check and then fail inside core as a transport error, which classifies transient and burns all five retries on a request that can never succeed.

A callback should test the host it is handed rather than returning true outright: true disables core's protections for that request completely, including the DNS-time check that is the only thing standing between this and a name repointed at loopback. Core's own http_allowed_safe_ports is the narrower lever when a port is the only problem.

Filters whether a zap may be sent to an address WordPress refuses by default.

apply_filters( 'xpac_zapier_allow_unsafe_url', false, $request['url'] )
apply_filters( 'xpac_zapier_allow_unsafe_url', false, $url )
  • $allowed (bool) — Whether to send anyway. Default false.
  • $url (string) — The configured URL.

Fired from:

  • packages/Zapier/Addon.php:1051
  • packages/Zapier/Addon.php:1449
  • packages/Zapier/Addon.php:1483
  • packages/Zapier/Agent.php:145
  • packages/Zapier/Notifications/Channel.php:132

xpac_zapier_field_value

Filter · 7 arguments · 1 call site

Filters one submitted field value on its way into a zap payload.

The first four arguments are the original public signature. The field name, payload key and Submission were appended so callbacks can identify and redact one value. File fields reach this filter after their attachment ids become an array of public URLs, and choice fields as the labels the visitor picked when the zap sends choice labels.

apply_filters( 'xpac_zapier_field_value', $field_value, $field_type, $data, $blocks, $value, $name, $submission )
  • $field_value (mixed) — Submitted value, or public URL array for files.
  • $field_type (string) — Forms field type.
  • $data (array) — Whole submitted data map.
  • $blocks (array) — Whole field-block map.
  • $value (string) — Form field name.
  • $name (string) — Outgoing payload key.
  • $submission (Submission) — Callback-safe delivery clone.

Fired from:

  • packages/Zapier/Addon.php:1907

xpac_zapier_request_body

Filter · 3 arguments · 1 call site

Filters the complete Zapier request body before it is encoded.

Return an array or a WP_Error. The latter records a permanent delivery failure without sending a partial payload.

apply_filters( 'xpac_zapier_request_body', $zap_data, $item, $submission )
  • $zap_data (array) — Complete payload.
  • $item (array) — Stored zap settings.
  • $submission (Submission) — Submission being delivered.

Fired from:

  • packages/Zapier/Addon.php:1987

xpac_zapier_request_timeout

Filter · 1 argument · 1 call site

Filters how long, in seconds, to wait for a Catch Hook to reply.

The request no longer runs inside the visitor's submission, so this is a tolerance for a slow endpoint rather than a latency budget: nothing is waiting on it, and a timeout shorter than Zapier's own response time turns a zap that fired into a needless retry.

Clamped to 1-30 seconds, so a value outside that range is pulled back into it rather than refused.

apply_filters( 'xpac_zapier_request_timeout', 10 )
  • $timeout (int) — Seconds to wait. Default 10.

Fired from:

  • packages/Zapier/Addon.php:1045

xpac_zapier_response

Action · 3 arguments · 1 call site

Fires once a Catch Hook has answered, successfully or not.

Everything the bounded log keeps, before it is bounded, for a site that wants to ship deliveries somewhere with real retention.

do_action( 'xpac_zapier_response', $entry, $url, $submission )
  • $entry (array) — Status, elapsed ms, kept headers, body excerpt.
  • $url (string) — Full URL the request was made to.
  • $submission (Submission) — Submission being delivered.

Fired from:

  • packages/Zapier/Addon.php:1213

xpac_zapier_response_log_entries

Filter · 1 argument · 1 call site

Filters how many response records one zap keeps.

Zero switches the stored log off entirely and leaves the action above as the only sink. Clamped to 0-20.

apply_filters( 'xpac_zapier_response_log_entries', self::RESPONSE_LOG_ENTRIES )
  • $entries (int) — Records to keep. Default 5.

Fired from:

  • packages/Zapier/Addon.php:1223

xpac_zapier_send_ip_address

Filter · 2 arguments · 1 call site

Filters whether the visitor's IP address is forwarded to Zapier.

It is personal data, and what a Zap does with it is outside this plugin, so a site with a reason not to send it returns false here and the key is sent empty rather than dropped — dropping it would change the shape the Catch Hook captured.

Only asked when the zap's "Include visitor IP and browser" is on. A zap saved before that choice existed has it on; with it off, both ip_address and user_agent are sent empty.

The value is the connecting address. The framework's provider used to prefer X-Real-IP and X-Forwarded-For, which the sender chooses; it now returns REMOTE_ADDR unless xpac_trust_proxy_headers says otherwise.

apply_filters( 'xpac_zapier_send_ip_address', true, $submission )
  • $send (bool) — Whether to include it. Default true.
  • $submission (Submission) — Submission being delivered.

Fired from:

  • packages/Zapier/Addon.php:1970

xpac_zapier_send_unanswered_fields

Filter · 1 argument · 1 call site

Filters whether "all fields" sends every configured key.

True, the default, sends an empty string for a field that was hidden or left blank — and an empty list for a file field — so a Catch Hook captures the form's field list rather than one visitor's answers. False restores the older behaviour of omitting them.

Only consulted in "all fields" mode. A hand-written mapping is never changed by it.

apply_filters( 'xpac_zapier_send_unanswered_fields', true )
  • $send (bool) — Whether to send unanswered keys. Default true.

Fired from:

  • packages/Zapier/Addon.php:1170

On this page