Gratora 1.2.7 has 79 actions and 78 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Gratora fires an action
add_action( 'gratora.donor.updated', function( $donor ) {
// Your code runs here.
}, 10, 1 );
// Change a value Gratora is about to use
add_filter( 'gratora.addons.remote', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
{$test?}gratora.readiness.test_mode_gaps{:}gratora.readiness.live_mode_gaps
filter Copy link Customise this hook/** * A gateway that ships in an add-on owns its own credentials, so it reports * its own gap. Without this the screen is silent about a processor set up for * one mode and never for the other. The two modes are separate filters because * a listener written for one would report the wrong gap under the other. */ apply_filters( "{$test?}gratora.readiness.test_mode_gaps{:}gratora.readiness.live_mode_gaps", $missing ); -
/** * Whether the Add-ons screen may ask gratora.net for its lists. */ apply_filters( 'gratora.addons.remote', true ); -
/** * Whether the deactivation dialog asks why and may tell gratora.net. */ apply_filters( 'gratora.deactivation.ask_why', true ); -
/** * A submission core's own form token refused, offered for verification by some * other proof. Return a SubmissionProof to accept it; anything else, `null` * included, leaves the refusal standing. */ apply_filters( 'gratora.donation.submission_proof', null, $scheme, $body ); -
/** * What an add-on knows about a donor that core cannot see: tickets it holds, a * page it runs, a tax declaration the delete would destroy. A warning rather * than a veto, because the decision is the operator's and the dialog is where * it gets made. */ apply_filters( 'gratora.donor.delete_warnings', [], $result['items'] ); -
/** * What an add-on holds that is the donor's own data, for the donor's export. */ apply_filters( 'gratora.donor.export_sections', [], $donor ); -
/** * How many rows one export may hold. The cap is memory, not policy: a whole * export held as one string exhausts the limit well inside it. */ apply_filters( 'gratora.export.max_rows', self::EXPORT_MAX_ROWS ); -
/** * Admin-facing names for gateways core does not ship. */ apply_filters( 'gratora.gateway_admin_labels', [] ); -
/** * Tune Stripe's automatic payment methods. */ apply_filters( 'gratora.gateway.stripe.automatic_payment_methods', $params['automatic_payment_methods'], $donation ); -
/** * Each add-on clears its own and says what went. */ apply_filters( 'gratora.orphans.clear', [] ); -
/** * Rows an add-on stranded while it was switched off. Empty on a healthy site, * which is what makes the card worth reading when it is not. */ apply_filters( 'gratora.orphans.report', [] ); -
/** * The document as markup, before Dompdf turns it into bytes nothing can read * back. The one seam an add-on has for the printed output. */ apply_filters( 'gratora.pdf.html', $html, $options ); -
/** * Process one add-on rebuild page. Store progress under your cursor key and * return done=false while rows remain. Check the clock after processing a row * to guarantee progress; return the bag unchanged when idle. */ apply_filters( 'gratora.recalculate.addons', [ 'counts' => $state['counts'], 'cursor' => (array) ($state['addon_cursor'] ?? []), 'done' => true, ], $state['rebuild_all'] ? 'all' : $scope, $until ); -
/** * Seconds one request spends rebuilding before handing the rest back. */ apply_filters( 'gratora.recalculate.budget_seconds', self::RECALC_BUDGET_SECONDS ); -
/** * Whether a visitor who is not signed in gets the test-mode relief too. */ apply_filters( 'gratora.spam.test_mode_relief_for_visitors', wp_get_environment_type() !== 'production' ); -
apply_filters( 'gratora.campaign.types', ['standard' => __('Standard', 'gratora-donation-platform')] ); -
do_action( 'gratora.donor.updated', $donor ); -
do_action( 'gratora.test_data.purge_donations', $chunk ); -
apply_filters( 'gratora.receipt.context', $ctx ); -
do_action( 'gratora.donation.refunded', $donation, $refund ); -
apply_filters( 'gratora.donor.retention_years', $stored ); -
apply_filters( 'gratora.event.retention_days', $stored ); -
apply_filters( 'gratora.form.amounts', DonationAmountBlock::normalizePresets($raw), $this->form, null, null ); -
do_action( 'gratora.form.deleted', $form ); -
do_action( 'gratora.fund.deleted', $source ); -
do_action( 'gratora.fund.reassign_failed', $source, $targetId ); -
apply_filters( 'gratora.license.manage_url', '' ); -
apply_filters( 'gratora.receipt.renderers', [] ); -
do_action( 'gratora.recurring.plan_amount_changed', $plan ); -
do_action( 'gratora.recurring.plan_changed', $plan, $change ); -
do_action( 'gratora.recurring.plan_interval_changed', $plan ); -
do_action( 'gratora.recurring.plan_resumed', $plan ); -
apply_filters( 'gratora.spam.min_amount_cents', self::MIN_AMOUNT_CENTS ); -
apply_filters( 'gratora.statement.pdf', null, $donor, $year, self::KIND ); -
do_action( 'gratora.test_data.purge_plans', $chunk ); -
do_action( 'enqueue_block_editor_assets' ); -
do_action( 'gratora.activated' ); -
do_action( 'gratora.activator.ran' ); -
apply_filters( 'gratora.admin.pages', [] ); -
apply_filters( 'gratora.audit.message', $message, (string) $e->type, $payload ); -
do_action( 'gratora.blocks.register_server', $blocks ); -
do_action( 'gratora.booted', $self ); -
apply_filters( 'gratora.campaign_style.tokens', $tokens, $campaign ); -
do_action( 'gratora.campaign_types.register', $r ); -
do_action( 'gratora.campaign.converted', $campaign, $prevType ); -
do_action( 'gratora.campaign.created', $campaign ); -
do_action( 'gratora.campaign.deleted', $campaign ); -
do_action( 'gratora.campaign.duplicated', $copy, $source ); -
do_action( 'gratora.campaign.page_lost', $campaign ); -
do_action( 'gratora.campaign.page_restored', $campaign ); -
do_action( 'gratora.campaign.recurring_cancelled', $campaignId, $failed ); -
apply_filters( 'gratora.campaign.starter_blocks', $default, $campaign, $template ); -
apply_filters( 'gratora.campaign.starter_form_template', $id, $campaign, $pageTemplate ); -
apply_filters( 'gratora.campaign.supports_page_templates', true, (string) $campaign->campaign_type, $campaign ); -
apply_filters( 'gratora.campaign.templates', $templates, $campaignType ); -
apply_filters( 'gratora.campaign.type_notices', [] ); -
do_action( 'gratora.campaign.updated', $campaign ); -
apply_filters( 'gratora.capabilities', [ 'all' => self::ALL, 'groups' => self::GROUPS, 'labels' => self::coreLabels(), ] ); -
apply_filters( 'gratora.capabilities.admin_caps', [] ); -
apply_filters( 'gratora.commands.confirmation_verifier', null ); -
do_action( 'gratora.commands.register', $self->container->get(CommandRegistry::class), $self->container ); -
do_action( 'gratora.consent.recorded', $row, [ 'purpose_key' => $purposeKey, 'version' => $version, ] ); -
do_action( 'gratora.deactivated' ); -
apply_filters( 'gratora.donation.attribution_labels', [], $credited ); -
apply_filters( 'gratora.donation.attribution_options', [], $campaignId ); -
do_action( 'gratora.donation.completed', $donation ); -
do_action( 'gratora.donation.creating', $donation, $intent, $donor ); -
do_action( 'gratora.donation.deleted', $snapshot ); -
do_action( 'gratora.donation.disputed', $donation, $kind ); -
do_action( 'gratora.donation.failed', $donation ); -
do_action( 'gratora.donation.intent_created', $donation, $intent ); -
apply_filters( 'gratora.donation.intent_creating', $intent ); -
do_action( 'gratora.donation.pending', $donation, $reason, $metadata ); -
do_action( 'gratora.donation.processing', $donation, $reason, $metadata ); -
apply_filters( 'gratora.donation.refund_refusal', null, $donation, $amountCents ); -
do_action( 'gratora.donation.refund_reversed', $donation, $refund ); -
do_action( 'gratora.donation.renewal_creating', $donation, $plan, Donor::query()->where('id', (int) $plan->donor_id)->get() ); -
do_action( 'gratora.donation.restored', $donation ); -
do_action( 'gratora.donation.reversal_reinstated', $donation ); -
do_action( 'gratora.donation.trashed', $donation ); -
apply_filters( 'gratora.donation.undeletable_reason', null, $donation ); -
do_action( 'gratora.donation.updated', $d ); -
apply_filters( 'gratora.donations.abandon_after_days', self::AFTER_DAYS ); -
do_action( 'gratora.donor.aggregates_synced', $donorId, $after, $before ); -
do_action( 'gratora.donor.created', $donor ); -
do_action( 'gratora.donor.deleted', $id, $hash ); -
do_action( 'gratora.donor.email_changed', $donor, [ 'old_hash' => $oldHash, 'new_hash' => $newHash, ] ); -
apply_filters( 'gratora.donor.erasure_handlers', [] ); -
do_action( 'gratora.donor.first_donation_completed', $donorId, $after ); -
apply_filters( 'gratora.donor.lapsed_threshold_days', 180 ); -
do_action( 'gratora.donor.recovered', $donorId, $after, [ 'previous_last_donation_at' => $prevLast, 'lapsed_days_threshold' => $lapsedDays, ] ); -
apply_filters( 'gratora.donor.retention_days_after_redaction', $stored ); -
apply_filters( 'gratora.donor.retention_starts_at', $stored ); -
apply_filters( 'gratora.donor.undeletable_reason', null, $donor ); -
do_action( 'gratora.editor.assets', self::HANDLE ); -
apply_filters( 'gratora.email.donation_template', $template, $donationTemplate, $donation ); -
apply_filters( 'gratora.email.template_meta', [] ); -
apply_filters( 'gratora.email.template_tags', [ 'donation_receipt' => array_merge($donation, ['receipt_number', 'reference', 'download_url']), 'donation_first' => $donor, 'donation_pending' => array_merge($donation, ['reference']), 'donation_refunded' => array_merge($donation, ['reference', 'refund_timing']), 'offline_instructions' => array_merge($donation, ['reference', 'bank_details', 'instructions']), 'payment_pending' => array_merge($d... ); -
do_action( 'gratora.event.recorded', $event ); -
apply_filters( 'gratora.event.recording', $ctx, $type ); -
apply_filters( 'gratora.export.donors_max_rows', self::MAX_ROWS ); -
apply_filters( 'gratora.export.encrypted_columns', self::ENCRYPTED ); -
apply_filters( 'gratora.export.tables', self::TABLES ); -
apply_filters( 'gratora.form_style.tokens', $tokens, $form, $campaign ); -
do_action( 'gratora.form_types.register', $r ); -
apply_filters( 'gratora.form.block_field', null, $name, $attrs, $form ); -
apply_filters( 'gratora.form.config', $config, $form, $variant, $visitor ); -
do_action( 'gratora.form.created', $form ); -
do_action( 'gratora.form.duplicated', $copy, $source ); -
apply_filters( 'gratora.form.editor_preview', false, $form ); -
apply_filters( 'gratora.form.steps', $built['steps'], $form, $variant, $visitor ); -
apply_filters( 'gratora.form.templates', $templates ); -
do_action( 'gratora.form.updated', $form ); -
apply_filters( 'gratora.form.variant', null, $form, $this->visitorContext() ); -
apply_filters( 'gratora.form.visitor_context', $base ); -
do_action( 'gratora.fund.created', $fund ); -
do_action( 'gratora.fund.deactivated', $fund ); -
do_action( 'gratora.fund.reassign_queued', $fund, $target ); -
do_action( 'gratora.fund.reassigned', $source, $target ); -
do_action( 'gratora.fund.updated', $fund ); -
do_action( 'gratora.gateways.register', $self->container->get(GatewayManager::class), $self->container ); -
do_action( 'gratora.module.incompatible', $id, GRATORA_VERSION, $coreConstraint ); -
do_action( 'gratora.modules.register', $self->modules ); -
apply_filters( 'gratora.portal.donation', [ 'id' => (int) $d->id, 'reference' => (string) $d->reference, 'amount_cents' => (int) $d->amount_cents, 'fee_covered_cents' => (int) $d->fee_covered_cents, 'refunded_cents' => (int) $d->refunded_cents, 'currency' => (string) $d->currency, 'frequency' => (string) $d->frequency, 'gateway' => (string) $d->gateway, 'campaign_id' => $d->campaign_id ? (int) $d->campaign_id : null, 'campaign_title' =... ); -
apply_filters( 'gratora.portal.send_link_email_max', self::SEND_LINK_EMAIL_MAX ); -
apply_filters( 'gratora.portal.send_link_ip_max', self::SEND_LINK_IP_MAX ); -
apply_filters( 'gratora.portal.url', '' ); -
apply_filters( 'gratora.pro.license_status', $default ); -
apply_filters( 'gratora.pro.product_status', 'unknown', $addon['id'] ); -
apply_filters( 'gratora.recalculate.scopes', [] ); -
do_action( 'gratora.receipt.email_failed', $receipt ); -
do_action( 'gratora.receipt.email_sent', $receipt ); -
do_action( 'gratora.receipt.issued', $receipt, $ctx ); -
apply_filters( 'gratora.receipt.should_issue', $shouldIssue, $donation ); -
do_action( 'gratora.recurring.cancelled', $plan, $reason ); -
do_action( 'gratora.recurring.payment_method_updated', $plan ); -
do_action( 'gratora.recurring.plan_paused', $plan, $resumesAt ); -
do_action( 'gratora.recurring.plan_skipped', $plan ); -
do_action( 'gratora.recurring.renewal_failed', $plan, [ 'gateway' => (string) $plan->gateway, 'reason' => $reason, 'attempt' => $attempt, ] ); -
do_action( 'gratora.recurring.renewed', $donation, $plan ); -
do_action( 'gratora.recurring.resume_failed', $plan, $e ); -
do_action( 'gratora.recurring.subscription_creation_failed', $donation, $e ); -
do_action( 'gratora.rest.register', $registry ); -
do_action( 'gratora.sandbox.rehearsal_ended', $plan, $reason ); -
do_action( 'gratora.sandbox.renewal_failed', $plan, $e ); -
apply_filters( 'gratora.settings.groups', self::GROUPS ); -
do_action( 'gratora.settings.rejected', $group, $rejected ); -
do_action( 'gratora.settings.updated', $group, $next, $current ); -
apply_filters( 'gratora.social_meta', $this->tagsFor($campaign, $pageId), [ 'campaign' => $campaign, 'page_id' => $pageId, ] ); -
apply_filters( 'gratora.social_meta.enabled', ! $seoActive ); -
apply_filters( 'gratora.spam.client_ip', null, $remote ); -
apply_filters( 'gratora.spam.pre_check', null, $submission ); -
apply_filters( 'gratora.spam.token_window_days', self::TOKEN_WINDOW_DAYS ); -
apply_filters( 'gratora.spam.trusted_proxies', $stored ); -
do_action( 'gratora.uninstall' ); -
apply_filters( 'gratora.upgrade.routines', $routines ); -
apply_filters( 'nonce_life', DAY_IN_SECONDS, 'wp_rest' );
Generated from Gratora's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: