Hooks

SendGrid

6 hooks fired by SendGrid: 6 filters and 0 actions across 6 call sites.

6 hooks fired by SendGrid: 6 filters and 0 actions across 6 call sites. 6 of the 6 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.

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-${ID}` )

Fired from:

  • assets/packages/sendgrid/Components/Modal.js:92

xpac_sendgrid_attachment_budget

Filter · 1 argument · 1 call site

Filters the total size, in bytes, of the files one email may carry.

SendGrid refuses a message over 30MB with a 413, and base64 inflates every file by about a third, so the default leaves room for the template and the rest of the payload rather than aiming at the limit.

apply_filters( 'xpac_sendgrid_attachment_budget', 5 * MB_IN_BYTES )
  • $budget (int) — Bytes of original file, summed across the message.

Fired from:

  • packages/SendGrid/Addon.php:1878

xpac_sendgrid_email_field_value

Filter · 4 arguments · 1 call site

Filters a submitted field value before it becomes a SendGrid template variable.

Only the default branch of the field-type switch reaches this, so checklist, dropdown, radio, confirmation and file fields never pass through it: each of those builds its own display value earlier in the switch. The returned value is stored against the field's {{name}} variable, which is what fills the dynamic template data posted to SendGrid and the To / Reply-To substitutions on the action.

apply_filters( 'xpac_sendgrid_email_field_value', $data_value, $type, $key, $submission )
  • $data_value (mixed) — The submitted value for this field, unmodified.
  • $type (string) — Forms field type of the block the value came from, as resolved by Blocks::getFieldTypeByBlock().
  • $key (string) — The field's name attribute, which is also the {{...}} variable the value is stored under.
  • $submission (Submission) — The submission currently being processed.

Fired from:

  • packages/SendGrid/Addon.php:1445

xpac_sendgrid_request_timeout

Filter · 1 argument · 1 call site

Filters how long, in seconds, to wait for SendGrid to answer.

These requests no longer run inside the visitor's submission, so this is a tolerance for a slow API rather than a latency budget: nothing is waiting on it, and a timeout shorter than SendGrid's own response time turns a delivery that worked into a needless retry. Ten rather than WordPress's five, for that reason.

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

Fired from:

  • packages/SendGrid/Client.php:92

xpac_sendgrid_sandbox_mode

Filter · 2 arguments · 1 call site

Filters whether this send is validated by SendGrid rather than delivered.

True asks SendGrid to check the message and throw it away. Read as the action was configured, not from the request the delivery runs in: it is digested into the delivery key, so a value that moves between two attempts is a message sent twice.

apply_filters( 'xpac_sendgrid_sandbox_mode', ! empty($item['sandbox']), $item )
  • $sandbox (bool) — Whether to send in sandbox mode. Default false.
  • $item (array) — The configured action.

Fired from:

  • packages/SendGrid/Addon.php:2002

xpac_sendgrid_verify_contacts_jobs

Filter · 2 arguments · 1 call site

Filters whether a queued SendGrid contacts job is asked about at all.

False restores the behaviour of every release before this one: the 202 is taken as the write, and whatever the job decides about each contact is neither seen nor reported.

apply_filters( 'xpac_sendgrid_verify_contacts_jobs', true, $jobId )
  • $verify (bool) — Whether to check the job. Default true.
  • $jobId (string) — Job id SendGrid answered with.

Fired from:

  • packages/SendGrid/Addon.php:2503

On this page