DOCS

Donation system

The donation system processes contributions made through the get-fund/donation-form block. It handles validation, spam protection, payment routing, and data storage. PayPal is the built-in free payment gateway. Mollie and Stripe require Pro. This is a free feature (with Pro extensions).

Donation page for Mei Schneider children's education fundraiser
Every contribution counts! This fundraiser for children’s education has raised €447 toward its €4,500 goal.

Why use this

The donation form block is the primary way supporters contribute to a fundraising page. It collects donor details, processes payment, stores donation records in a dedicated database table (or post meta as fallback), updates raised amounts, and sends confirmation emails.

What it does

Submission flow

  1. Visitor submits the form via AJAX (wp_ajax_get_fund_process_donation or wp_ajax_nopriv_get_fund_process_donation).
  2. Nonce is verified (get_fund_donation_nonce).
  3. Honeypot field is checked.
  4. Rate limit is checked: 5 submissions per IP per 15 minutes.
  5. Provider is validated against the allowed providers list.
  6. Amount is validated (required check, min/max).
  7. Donation record is created (custom table when available, post meta as fallback).
  8. Payment is initiated with the selected provider.
  9. On payment confirmation, raised amounts are updated and confirmation email is sent.
  10. Donor is redirected to the thank-you page.

Form fields

FieldDescription
action_idPost ID of the fundraising page (required)
donation_amountDonation amount (float)
donation_typeone-time (recurring is gated and disabled in free)
donor_first_nameDonor first name
donor_middle_nameDonor middle name
donor_last_nameDonor last name
donor_emailDonor email address (required)
donor_phoneDonor phone number
donor_messageOptional message to the fundraiser
payment_providermollie, stripe, paypal, or test
payment_methodPayment method within the provider
marketing_consentCheckbox, 1 if consented
is_anonymousCheckbox, 1 if donor wants to remain anonymous
custom_*Any POST key prefixed custom_ is stored in _get_donation_custom_fields as JSON
form_thank_you_pageOverride the global thank-you page ID for this form
form_modeSet to contact to bypass amount requirement (leads/petition flow)

Payment providers

ProviderAvailable in
PayPalFree (see PayPal)
TestFree (marks donation as paid immediately, no real transaction)
MolliePro only
StripePro only

In the free plugin, submitting with mollie or stripe as the provider returns an error: no_pro_gateway. The provider list is filterable via get_fund_allowed_payment_providers.

Leads mode

When form_mode is set to contact and the amount is zero, the donation is stored with status leads and payment provider leads. This lets the form work as a contact or petition form without requiring a payment. The get_fund_donation_completed action fires normally.

Data storage

Donations are stored in {prefix}get_fund_donations when the table exists (is_custom_table_ready() returns true). The legacy WP post-based storage is used as a fallback and for backwards compatibility. Both are written on new donations when the custom table is available.

Raised amount updates

On get_fund_donation_paid, the Stats Model recalculates raised amounts and updates both the custom stats table and the _get_fund_raised_amount postmeta on the action. The _get_fund_raised_amount_offset meta is added as a manual boost.

How to use it

  1. Add the get-fund/donation-form block to a fundraising page (action post).
  2. Configure at least one payment provider in Fundations > Settings > Payments.
  3. Set a minimum and maximum donation amount if needed.
  4. Visitors fill in the form and complete payment.
Fundations Settings PayPal payment provider configuration panel
Configure PayPal as a payment provider in Fundations Settings, complete with live and sandbox API credentials.

Currency

As of 2.9.0 the currency is fully configurable under Settings > Donations > General. Every amount in the plugin, on the front end, in the admin, and in emails, is formatted through the get_fund_money() helper, which reads these options. There is no hardcoded currency symbol.

Option keyDefaultDescription
get_fund_wizard_currencyEURISO 4217 currency code.
get_fund_wizard_currency_symbolSymbol shown with amounts.
get_fund_currency_positionbeforebefore or after the amount.
get_fund_decimal_separator,Decimal separator.
get_fund_thousands_separator.Thousands separator.
get_fund_amount_decimals0Decimal places (0 or 2).

To adjust formatting in code, filter get_fund_currency_format.

Settings and options

Option keyDefaultDescription
get_fund_donation_test_modefalseWhen true, all donations are marked paid immediately without real payment
get_fund_allowed_payment_providers(filter)List of active providers

Validation filters

FilterDefaultDescription
get_fund_donation_require_amounttrueWhether an amount is required. Return false for petition/lead forms.
get_fund_donation_min_amount1.00Minimum allowed donation amount
get_fund_donation_max_amount100000.00Maximum allowed donation amount
get_fund_submission_rate_limit5Maximum submissions per IP per 15-minute window

What you can and cannot do

You can add custom form fields using the form builder and retrieve them via custom_* POST fields. You can accept donations without a payment (leads mode) or use test mode to verify the flow without real transactions. A signature image (base64 PNG) can be submitted as custom_signature; it is saved as a media attachment.

Recurring donations are not available in the free plugin (gated by GET_FUND_RECURRING_ENABLED constant, currently false). Mollie and Stripe require Pro.

Troubleshooting

Donation form returns “invalid nonce” error. The page may be cached. The nonce is generated per-session. Ensure your caching plugin excludes the donation form nonce or regenerates it dynamically.

Rate limit is being hit by legitimate donors. Use the get_fund_submission_rate_limit filter to increase the limit. It is also worth checking whether a bot is submitting the form.

Donation not appearing in admin after PayPal payment. PayPal sends a webhook to confirm payment. Check that the webhook URL (/wp-json/get-fund/v1/paypal-webhook) is reachable from the internet and not blocked by your server or security plugin.

Amount shows as zero. Confirm _get_fund_raised_amount is set on the action. If using the custom table, confirm is_custom_table_ready() returns true by checking that the {prefix}get_fund_donations table exists.

Developer reference

Actions

HookArgumentsDescription
get_fund_before_donation_processint $action_id, float $amount, string $email, string $providerFires before any processing begins.
get_fund_donation_meta_savedint $donation_id, int $action_id, float $amount, array $donor_dataFires after donation meta is saved.
get_fund_donation_status_transitionint $donation_id, string $new_status, string $old_statusFires on every status change.
get_fund_donation_completedint $donation_id, array $dataFires when submission processing completes (paid or leads).
get_fund_donation_paidint $donation_idFires when payment is confirmed. Use this to trigger downstream actions.
get_fund_before_payment_{provider}int $donation_id, float $amount, int $action_idFires before initiating payment with a specific provider.
get_fund_after_payment_{provider}int $donation_id, float $amount, int $action_idFires after the provider returns.
get_fund_donation_createdint $donation_idFires when a donation record is first created.
get_fund_donation_updatedint $donation_idFires when a donation record is updated.
get_fund_donation_deletedint $donation_idFires when a donation record is deleted.

Filters

HookArgumentsDescription
get_fund_allowed_payment_providersarray $providersModify the list of accepted payment provider slugs. Default: ['mollie','stripe','paypal','test',''].
get_fund_create_paymentmixed $result, string $provider, int $donation_id, float $amount, string $description, string $emailIntercept payment creation. Return a WP_Error to abort.
get_fund_donation_require_amountbool $required, int $action_idWhether an amount is required.
get_fund_donation_min_amountfloat $min, int $action_idMinimum allowed amount.
get_fund_donation_max_amountfloat $max, int $action_idMaximum allowed amount.
get_fund_submission_rate_limitint $limitSubmissions per IP per 15-minute window.
get_fund_thank_you_urlstring $url, int $donation_id, int $action_idOverride the post-donation redirect URL.
get_fund_donation_data_before_createarray $dataModify donation data array before the record is inserted.
get_fund_donation_amount_optionsarray $optionsPreset amount buttons shown in the form.
get_fund_donation_form_fieldsarray $fieldsModify the fields rendered in the donation form.
get_fund_donation_form_outputstring $htmlFilter the final rendered donation form HTML.

Example: custom minimum amount per action

add_filter( 'get_fund_donation_min_amount', function( $min, $action_id ) {
    if ( $action_id === 42 ) {
        return 10.00;
    }
    return $min;
}, 10, 2 );