DOCS

Hooks & filters reference

This page documents all action hooks and filters that Fundations (FREE, version 2.8.x) exposes for third-party code. Hooks are grouped by subsystem. Each entry lists the parameter signatures as they appear in the source.

Use add_action() for action hooks and add_filter() for filters. All hooks use the get_fund_ prefix.

Why use hooks and filters

Hooks let you extend Fundations behavior without editing plugin files. You can send notifications when donations complete, restrict who can edit a fundraiser, change how amounts are displayed, modify the child-actions query, or add custom validation to the wizard.

Important: get_fund_donation_paid vs get_fund_donation_completed

Two hooks fire when a donation is confirmed. The distinction matters for production use.

get_fund_donation_paid fires in trait-donation-lifecycle.php when a real payment is confirmed. The Stats Model listens to this hook to recalculate totals. Use this hook for any logic that requires an actual payment, such as updating external systems or sending receipts.

get_fund_donation_completed fires in test mode, leads/petition mode, and via the PayPal return and webhook paths. It passes a data array with {amount, action_id, donor_name, donor_email}. PRO’s Integration Manager hooks this event to trigger automations.

For reliable production use, hook get_fund_donation_paid for payment-sensitive logic. Hook get_fund_donation_completed for side effects that should also fire during testing and petition mode.

Donation submission

Source: includes/donation/trait-submission.php

HookTypeSignature
get_fund_submission_rate_limitfilter(int $max) Default: 5 per IP per 15 minutes
get_fund_allowed_payment_providersfilter(array $providers) Default: ['mollie','stripe','paypal','test','']
get_fund_donation_require_amountfilter(bool $required, int $action_id) Default: true
get_fund_donation_min_amountfilter(float $min, int $action_id) Default: 1.00
get_fund_donation_max_amountfilter(float $max, int $action_id) Default: 100000.00
get_fund_before_donation_processaction($action_id, $donation_amount, $donor_email, $payment_provider)
get_fund_donation_meta_savedaction($donation_id, $action_id, $donation_amount, array $donor_data) where $donor_data has keys name and email
get_fund_donation_status_transitionaction($donation_id, $new_status, $old_status)
get_fund_donation_completedaction($donation_id, array $data) where $data has keys amount, action_id, donor_name, donor_email
get_fund_thank_you_urlfilter(string $url, int $donation_id, int $action_id)
get_fund_before_payment_{$provider}action($donation_id, $donation_amount, $action_id) Dynamic: e.g. get_fund_before_payment_paypal
get_fund_after_payment_{$provider}action($donation_id, $donation_amount, $action_id) Dynamic hook per provider
get_fund_create_paymentfilter(WP_Error $result, string $provider, int $donation_id, float $amount, string $description, string $donor_email) PRO only: PRO registers the real handler; FREE returns a WP_Error

Example: enforce a minimum donation

add_filter( 'get_fund_donation_min_amount', function( $min, $action_id ) {
    // Require at least €5 on all fundraisers
    return 5.00;
}, 10, 2 );

Example: act on a confirmed payment

add_action( 'get_fund_donation_paid', function( $donation_id ) {
    $action_id = get_post_meta( $donation_id, '_get_donation_action_id', true );
    $amount    = get_post_meta( $donation_id, '_get_donation_amount', true );
    // Update an external CRM, send a receipt, etc.
} );

Donation model

Source: includes/class-get-fund-donation-model.php

These hooks fire at the database level when donation records are created, changed, or removed.

HookTypeSignature
get_fund_donation_data_before_createfilter(array $data, int $action_id) Modify the data array before the record is inserted
get_fund_donation_createdaction($donation_id, array $data)
get_fund_donation_updatedaction($donation_id, array $data, array $existing)
get_fund_donation_deletedaction($donation_id, array $donation)

Example: tag high-value donations before creation

add_filter( 'get_fund_donation_data_before_create', function( $data, $action_id ) {
    if ( isset( $data['amount'] ) && (float) $data['amount'] >= 500 ) {
        $data['tier'] = 'major';
    }
    return $data;
}, 10, 2 );

Donation lifecycle

Source: includes/donation/trait-donation-lifecycle.php

HookTypeSignature
get_fund_donation_paidaction($donation_id) Fires when status transitions to paid via a webhook or reconciliation cron

Donation form renderer

Source: includes/donation/trait-renderer.php

HookTypeSignature
get_fund_donation_form_fieldsfilter(array $field_order, int $action_id, array $attributes)
get_fund_custom_field_rowsfilter(null $rows, array $attributes)
get_fund_template_settingsfilter(array $settings, array $attributes)
get_fund_before_donation_formaction($action_id, array $attributes)
get_fund_donation_amount_optionsfilter(array $amounts, int $action_id)
get_fund_mollie_payment_methodsfilter(array $methods) Relevant only when PRO and Mollie are active
get_fund_custom_fieldsfilter(array $custom_fields, array $attributes)
get_fund_after_donation_formaction($action_id, array $attributes)
get_fund_donation_form_outputfilter(string $output, int $action_id, array $attributes)

Example: add a preset amount option

add_filter( 'get_fund_donation_amount_options', function( $amounts, $action_id ) {
    $amounts[] = 250;
    sort( $amounts );
    return $amounts;
}, 10, 2 );

Donation email

Source: includes/donation/trait-donation-email.php

HookTypeSignature
get_fund_donation_email_recipientsfilter(string $email, int $donation_id) Override the confirmation email recipient

Action Wizard

Source: includes/class-get-fund-action-wizard.php

These hooks let you modify the wizard submission flow: validate input, alter the post data before creation, inject custom meta, and redirect after creation.

HookTypeSignature
get_fund_wizard_campaign_query_argsfilter(array $args, string $search)
get_fund_wizard_form_datafilter(array $data) Sanitized form data before validation
get_fund_wizard_validation_errorsfilter(array $errors, array $data) Return non-empty array to block submission
get_fund_wizard_post_datafilter(array $post_data, array $data) wp_insert_post arguments
get_fund_wizard_meta_valuesfilter(array $meta_values, int $post_id, array $data)
get_fund_action_createdaction($post_id, array $extra) Second argument is always an empty array
get_fund_wizard_redirect_urlfilter(string $url, int $post_id)
get_fund_wizard_user_createdaction($user_id, string $email, string $first_name, string $last_name)
get_fund_wizard_allowed_image_typesfilter(array $mime_types, int $post_id)
get_fund_wizard_upload_imagefilter(int $attachment_id, int $post_id, array $uploaded_file)

Example: enforce a minimum goal amount in the wizard

add_filter( 'get_fund_wizard_validation_errors', function( $errors, $data ) {
    if ( isset( $data['goal_amount'] ) && (float) $data['goal_amount'] < 50 ) {
        $errors[] = __( 'Minimum goal amount is €50.', 'my-plugin' );
    }
    return $errors;
}, 10, 2 );

Example: notify admin when a fundraiser is created

add_action( 'get_fund_action_created', function( $post_id ) {
    $title = get_the_title( $post_id );
    wp_mail(
        get_option( 'admin_email' ),
        'New fundraiser created',
        'A new fundraiser was created: ' . $title
    );
} );

Note: the second parameter of get_fund_action_created is always an empty array. Declare your callback with only one parameter.

Frontend edit form

Source: includes/class-get-fund-frontend-edit.php

HookTypeSignature
get_fund_user_can_edit_actionfilter(bool $can_edit, int $post_id, int $current_user_id)
get_fund_edit_form_fieldsfilter(array $form_data, int $post_id) Keys: post, amount, raised_amount, end_date
get_fund_before_frontend_editaction($post_id)
get_fund_after_frontend_editaction($post_id)
get_fund_edit_form_save_datafilter(array $post_data, int $post_id) wp_update_post arguments
get_fund_action_updatedaction($post_id)
get_fund_edit_redirect_urlfilter(string $url, int $post_id)
get_fund_action_closedaction($post_id)

Example: allow a team manager to edit any fundraiser

add_filter( 'get_fund_user_can_edit_action', function( $can_edit, $post_id, $user_id ) {
    if ( user_can( $user_id, 'manage_fund_team' ) ) {
        return true;
    }
    return $can_edit;
}, 10, 3 );

Post types

Source: includes/class-get-fund-post-types.php

HookTypeSignature
get_fund_block_template_lockfilter(bool/string $lock) Default: false. Pass 'all' to lock the block template
get_fund_block_templatefilter(array $template) Block template array for the get_fund_action CPT
get_fund_cpt_argsfilter(array $args) Full register_post_type args for get_fund_action
get_fund_meta_fields_registeredaction() Fires after all meta fields are registered
get_fund_campaign_post_typesfilter(array $types) Default: ['get_fund_action','get_campaign_action']

Block editor

Source: includes/class-get-fund-block-editor.php

HookTypeSignature
get_fund_registered_blocksaction() Fires after all blocks are registered. Use this to register custom blocks in the Fundations category
get_fund_progress_block_outputfilter(string $output, array $fund_data, array $attributes, int $post_id)
get_fund_stats_block_outputfilter(string $output, array $attributes, int $post_id)
get_fund_child_actions_block_outputfilter(string $output, array $attributes, int $post_id)
get_fund_child_actions_query_argsfilter(array $args, int $post_id)
get_fund_action_claimedaction($post_id, $user_id) Fires when a guest-created fundraiser is claimed

Example: sort child fundraisers by amount raised

add_filter( 'get_fund_child_actions_query_args', function( $args, $post_id ) {
    $args['orderby']  = 'meta_value_num';
    $args['meta_key'] = '_get_fund_raised_amount';
    $args['order']    = 'DESC';
    return $args;
}, 10, 2 );

Note: the filter passes $post_id as the second argument. Always declare your callback with both parameters.

Expiration cron

Source: includes/class-get-fund-expiration-cron.php

HookTypeSignature
get_fund_should_expire_actionfilter(bool $should, int $action_id) Return false to prevent expiry
get_fund_before_expirationaction($action_id)
get_fund_action_expiredaction($action_id, int $creator_id) $creator_id is 0 for unclaimed guest fundraisers
get_fund_action_reactivatedaction($action_id, string $new_end_date) $new_end_date is Y-m-d format
get_fund_expiration_email_placeholdersfilter(array $placeholders, int $action_id, string $recipient_type) $recipient_type is 'user' or 'admin'

Example: prevent expiry when goal is met

add_filter( 'get_fund_should_expire_action', function( $should, $action_id ) {
    $goal   = (float) get_post_meta( $action_id, '_get_fund_amount', true );
    $raised = (float) get_post_meta( $action_id, '_get_fund_raised_amount', true );
    if ( $goal > 0 && $raised >= $goal ) {
        return false;
    }
    return $should;
}, 10, 2 );

Stats model

Source: includes/class-get-fund-stats-model.php

HookTypeSignature
get_fund_stats_updatedaction($action_id, array $row) Fires after the stats table row is recalculated

The $row array contains at minimum total_raised, donation_count, donor_count, average_donation, last_donation_at, and last_donation_amount.

Example: check if goal is reached after each donation

add_action( 'get_fund_stats_updated', function( $action_id, $row ) {
    $goal = (float) get_post_meta( $action_id, '_get_fund_amount', true );
    if ( $goal > 0 && $row['total_raised'] >= $goal ) {
        // Goal reached: trigger your own notification here
    }
}, 10, 2 );

Source: includes/class-get-fund-gallery.php

HookTypeSignature
get_fund_gallery_settingsfilter(array $settings)
get_fund_gallery_image_datafilter(array $image_data, int $attachment_id) Keys: id, url, full, thumbnail, medium, large, alt, caption, title

Settings and currency

Source: includes/class-get-fund-settings.php

HookTypeSignature
get_fund_amount_decimalsfilter(int $decimals, float $amount)
get_fund_currency_formatfilter(string $formatted, float $amount, int $decimals, string $decimal_sep, string $thousands_sep)

User dashboard

Source: includes/class-get-fund-user-dashboard.php

HookTypeSignature
get_fund_dashboard_query_argsfilter(array $args, int $user_id)
get_fund_dashboard_statsfilter(array $stats, int $post_id) Keys: goal_amount, display_raised, percentage, status

User profile block

Source: includes/class-get-fund-user-profile-block.php

HookTypeSignature
get_fund_profile_updatedaction($user_id, array $user_data)
get_fund_password_changedaction($user_id)

Migration

Source: includes/class-get-fund-migration.php

These hooks are relevant when migrating donation data from the legacy postmeta storage to the custom donations table.

HookTypeSignature
get_fund_donation_migratedaction($new_id, int $legacy_post_id, array $data)
get_fund_migration_completedaction()
get_fund_migration_resetaction()

QR generator

Source: includes/class-get-fund-qr-generator.php

HookTypeSignature
get_fund_qr_datafilter(string $data, int $size) The string to encode, usually the fundraiser URL
get_fund_qr_settingsfilter(array $settings, string $data) Keys: size, margin, foreground_color, background_color (RGB arrays)

Form builder

Source: includes/class-get-fund-form-builder.php

HookTypeSignature
get_fund_form_builder_system_fieldsfilter(array $fields)

Privacy

Source: includes/class-get-fund-privacy.php

HookTypeSignature
get_fund_export_personal_datafilter(array $export_items, string $email_address)
get_fund_erase_personal_datafilter(array $erase_result, string $email_address, bool $items_removed)

Cache

Source: includes/donation/trait-form-helpers.php

HookTypeSignature
get_fund_purge_cacheaction(array $urls_to_purge, array $post_ids_to_purge)

Fundations purges caches from WP Super Cache, W3 Total Cache, LiteSpeed, WP Fastest Cache, SiteGround, Kinsta, and WP Engine after a donation is processed. Hook get_fund_purge_cache to purge additional layers such as a CDN or Varnish.

add_action( 'get_fund_purge_cache', function( $urls, $post_ids ) {
    foreach ( $urls as $url ) {
        my_cdn_purge( $url );
    }
}, 10, 2 );

Emails

Source: includes/class-get-fund-email-manager.php, includes/class-get-fund-email-tags.php, includes/class-get-fund-emails-admin.php

HookTypeSignature
get_fund_email_definitionsfilter(array $definitions) Add or change system email definitions. Each entry has key, category, subject, and a default body.
get_fund_email_tagsfilter(array $tags, array $context) Register tag families for Get_Fund_Email_Tags.
get_fund_email_tabsfilter(array $tabs) Add a tab to the Emails screen. Render it with the get_fund_email_tab_{$key} action.
get_fund_email_attachmentsfilter(array $attachments, array $context) Add attachments to a send. Context carries email_key (lifecycle) or event (per-form), plus donation_id where applicable. The Pro PDF receipt hooks here.
get_fund_email_recipientsfilter(array $recipients, string $key, array $context) Adjust resolved recipients before send.

Example: attach a file to the donation receipt

add_filter( 'get_fund_email_attachments', function( $attachments, $context ) {
    if ( 'donation_receipt' === ( $context['email_key'] ?? '' ) ) {
        $attachments[] = my_build_pdf( (int) $context['donation_id'] );
    }
    return $attachments;
}, 10, 2 );

Form notifications and confirmations

Source: includes/class-get-fund-form-notifications.php, includes/class-get-fund-form-conditions.php

HookTypeSignature
get_fund_donation_meta_savedactionDrives the submission notification dispatch.
get_fund_donation_status_transitionactionDrives the payment_failed notification dispatch.
get_fund_email_attachmentsfilterPer-form sends pass event in the context (payment_completed, submission, payment_failed).

Notifications and confirmations are stored in the get_fund_form_templates option per template, not via hooks. Conditions are evaluated by Get_Fund_Form_Conditions::passes().

Demo data

Source: includes/class-get-fund-demo-generator.php

HookTypeSignature
get_fund_demo_after_generateaction(array $created) Fires after the free generator runs. Pro adds tips here.
get_fund_demo_after_cleanupaction() Fires after demo data is removed.

Members and invitations

Source: includes/class-get-fund-post-types.php, includes/class-get-fund-member-invites.php (free stub), Pro engine

HookTypeSignature
get_fund_wizard_campaign_optionsaction() Fires in the wizard template where Pro renders the membership field.
get_fund_member_removedaction($target_type, $target_id, $member_action_id) Fires when an accepted member is detached (Pro).
get_fund_invite_token_ttlfilter(int $seconds) Invite token lifetime (default 72h, Pro).
get_fund_invite_bulk_maxfilter(int $max) Maximum addresses per bulk invite (default 50, Pro).

My Fundations and group assignment

Source: includes/class-get-fund-my-fundations-block.php

HookTypeSignature
get_fund_group_assignment_updatedaction($post_id) Fires after a page is reassigned to a different campaign, team, or event from the account page.

Complete quick-reference table

Hook nameTypeCategory
get_fund_submission_rate_limitfilterSubmission
get_fund_allowed_payment_providersfilterSubmission / Renderer
get_fund_donation_require_amountfilterSubmission / Model
get_fund_donation_min_amountfilterSubmission
get_fund_donation_max_amountfilterSubmission
get_fund_before_donation_processactionSubmission
get_fund_donation_meta_savedactionSubmission
get_fund_donation_status_transitionactionSubmission
get_fund_donation_completedactionSubmission
get_fund_thank_you_urlfilterSubmission
get_fund_before_payment_{$provider}actionSubmission
get_fund_after_payment_{$provider}actionSubmission
get_fund_create_paymentfilterSubmission (PRO)
get_fund_donation_data_before_createfilterModel
get_fund_donation_createdactionModel
get_fund_donation_updatedactionModel
get_fund_donation_deletedactionModel
get_fund_donation_paidactionLifecycle
get_fund_donation_form_fieldsfilterRenderer
get_fund_custom_field_rowsfilterRenderer
get_fund_template_settingsfilterRenderer
get_fund_before_donation_formactionRenderer
get_fund_donation_amount_optionsfilterRenderer
get_fund_mollie_payment_methodsfilterRenderer
get_fund_custom_fieldsfilterRenderer
get_fund_after_donation_formactionRenderer
get_fund_donation_form_outputfilterRenderer
get_fund_donation_email_recipientsfilterEmail
get_fund_wizard_campaign_query_argsfilterWizard
get_fund_wizard_form_datafilterWizard
get_fund_wizard_validation_errorsfilterWizard
get_fund_wizard_post_datafilterWizard
get_fund_wizard_meta_valuesfilterWizard
get_fund_action_createdactionWizard
get_fund_wizard_redirect_urlfilterWizard
get_fund_wizard_user_createdactionWizard
get_fund_wizard_allowed_image_typesfilterWizard
get_fund_wizard_upload_imagefilterWizard
get_fund_user_can_edit_actionfilterFrontend edit
get_fund_edit_form_fieldsfilterFrontend edit
get_fund_before_frontend_editactionFrontend edit
get_fund_after_frontend_editactionFrontend edit
get_fund_edit_form_save_datafilterFrontend edit
get_fund_action_updatedactionFrontend edit
get_fund_edit_redirect_urlfilterFrontend edit
get_fund_action_closedactionFrontend edit
get_fund_block_template_lockfilterPost types
get_fund_block_templatefilterPost types
get_fund_cpt_argsfilterPost types
get_fund_meta_fields_registeredactionPost types
get_fund_campaign_post_typesfilterPost types
get_fund_registered_blocksactionBlock editor
get_fund_progress_block_outputfilterBlock editor
get_fund_stats_block_outputfilterBlock editor
get_fund_child_actions_block_outputfilterBlock editor
get_fund_child_actions_query_argsfilterBlock editor
get_fund_action_claimedactionBlock editor
get_fund_should_expire_actionfilterExpiration
get_fund_before_expirationactionExpiration
get_fund_action_expiredactionExpiration
get_fund_action_reactivatedactionExpiration
get_fund_expiration_email_placeholdersfilterExpiration
get_fund_stats_updatedactionStats
get_fund_gallery_settingsfilterGallery
get_fund_gallery_image_datafilterGallery
get_fund_amount_decimalsfilterSettings
get_fund_currency_formatfilterSettings
get_fund_dashboard_query_argsfilterDashboard
get_fund_dashboard_statsfilterDashboard
get_fund_profile_updatedactionProfile
get_fund_password_changedactionProfile
get_fund_donation_migratedactionMigration
get_fund_migration_completedactionMigration
get_fund_migration_resetactionMigration
get_fund_qr_datafilterQR
get_fund_qr_settingsfilterQR
get_fund_form_builder_system_fieldsfilterForm builder
get_fund_export_personal_datafilterPrivacy
get_fund_erase_personal_datafilterPrivacy
get_fund_purge_cacheactionCache
get_fund_email_definitionsfilterEmails
get_fund_email_tagsfilterEmails
get_fund_email_tabsfilterEmails
get_fund_email_attachmentsfilterEmails
get_fund_email_recipientsfilterEmails
get_fund_demo_after_generateactionDemo data
get_fund_demo_after_cleanupactionDemo data
get_fund_wizard_campaign_optionsactionMembers
get_fund_member_removedactionMembers
get_fund_invite_token_ttlfilterMembers (PRO)
get_fund_invite_bulk_maxfilterMembers (PRO)
get_fund_group_assignment_updatedactionMy Fundations