SureDonation 1.7.2 has 38 actions and 90 filters, read directly from its source code on Nov 18, 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 SureDonation fires an action
add_action( 'suredonation_enqueue_form_frontend_scripts', function( $form_id, $post_content ) {
// Your code runs here.
}, 10, 2 );
// Change a value SureDonation is about to use
add_filter( 'astra_notices_user_cap_check', function( $has_cap ) {
// Change $has_cap here.
return $has_cap;
}, 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
-
/** * Fires when a donation form is rendered on the frontend. */ do_action( 'suredonation_enqueue_form_frontend_scripts', $form_id, $form->post_content ); -
/** * Fires when a donation payment is completed. */ do_action( 'suredonation_donation_completed', $donation_id, $payload ); -
/** * Fires after each import batch. Pro uses this to update the import-history * record's progress. */ do_action( 'suredonation_import_batch_complete', $import_id, $progress ); -
/** * Fires after an imported donor is created. Pro uses this to track created * donors for rollback. */ do_action( 'suredonation_import_donor_inserted', $id, $email ); -
/** * Filters whether the current user passes the capability check for notice * dismissal. */ apply_filters( 'astra_notices_user_cap_check', $has_cap ); -
/** * Filters the bootstrap data localized to the SureDonation admin React app * (exposed as window.suredonation_admin). Lets features inject additional data * before it reaches React. */ apply_filters( 'suredonation_admin_app_data', [ 'version' => SUREDONATION_VER, 'apiUrl' => rest_url( 'suredonation/v1' ), 'mcp_url' => rest_url( 'suredonation/v1/mcp' ), 'nonce' => wp_create_nonce( 'wp_rest' ), 'docsURL' => 'https://suredonation.com/docs/', 'plugin_url' => SUREDONATION_URL, 'site_url' => site_url(), 'admin_url' => admin_url(), 'is_first_campaign_created' => self::has_campaigns(), 'is_onboarding_completed' => Onboarding::ge... ); -
/** * Fires after a donation form has been duplicated. */ do_action( 'suredonation_after_form_duplicated', $new_form_id, $form_id ); -
/** * Filter the currencies a donor may pay in. */ apply_filters( 'suredonation_allowed_currencies', [ $base ] ); -
/** * Filter the blocks allowed in the donation form editor. */ apply_filters( 'suredonation_allowed_form_blocks', $blocks ); -
/** * Filter the allowed HTML tags/attributes for SureDonation form markup. */ apply_filters( 'suredonation_allowed_form_html', $allowed ); -
/** * Filter the icons offered for each preset donation amount. */ apply_filters( 'suredonation_amount_icons', $icons ); -
/** * Filter the list of available payment methods for this block. */ apply_filters( 'suredonation_available_payment_methods', $available, $block_payment_methods, $attributes ); -
/** * Renders above the amount choices, before the payment-type chooser. */ do_action( 'suredonation_before_donation_amount_field', $this->block_id, (int) $this->form_id ); -
/** * Filters the block-inserter preview image map. */ apply_filters( 'suredonation_block_preview_images', [ 'input' => $base . 'input.svg', 'email' => $base . 'email.svg', 'number' => $base . 'number.svg', 'checkbox' => $base . 'checkbox.svg', 'donor_comment' => $base . 'donor-comment.svg', 'anonymous_donation' => $base . 'checkbox.svg', 'cover_fees' => $base . 'checkbox.svg', 'dropdown' => $base . 'dropdown.svg', 'donation_amount' => $base . 'multi-choice.svg', 'address' => $base . 'address.svg', ... ); -
/** * Filters the Bricks elements SureDonation registers. */ apply_filters( 'suredonation_bricks_elements', $elements ); -
/** * Fires after a campaign is created from a template. */ do_action( 'suredonation_campaign_created_from_template', $template_id, $post_id ); -
/** * Fires when a user opens the campaign template picker. */ do_action( 'suredonation_campaign_template_picker_opened' ); -
/** * Filter the registered campaign templates. */ apply_filters( 'suredonation_campaign_templates', $templates ); -
/** * Fires when a campaign guided-tour run ends, or when a manual replay starts. */ do_action( 'suredonation_campaign_tour_outcome', $event, $step ); -
/** * Fires whenever the campaign guided tour is shown (i.e. on every call to this * endpoint). The built-in listener dedups recording per site; additional * listeners run on each fire and must dedup themselves if they need once-only * behavior. */ do_action( 'suredonation_campaign_tour_shown' ); -
/** * Filter SureDonation ability configurations. */ apply_filters( 'suredonation_config_abilities', $abilities ); -
/** * Filter donation data before insertion. */ apply_filters( 'suredonation_create_donation_data', $donation_data, $request ); -
/** * Filter payment intent data before sending to middleware. */ apply_filters( 'suredonation_create_payment_intent_data', $middleware_data, $intent_data['customer'] ?? null ); -
/** * Filter default email notifications. Pro uses this to add subscription email * notification templates. */ apply_filters( 'suredonation_default_email_notifications', $defaults ); -
/** * Filter the default validation messages. */ apply_filters( 'suredonation_default_validation_messages', $messages ); -
/** * Filters whether SureDonation's default frontend styling is disabled for a * form. */ apply_filters( 'suredonation_disable_default_styles', $disabled, $form_id ); -
/** * Fires when a new donation record is created. */ do_action( 'suredonation_donation_created', $donation_id, $payload ); -
/** * Fires when a donation is refunded, fully or partially. */ do_action( 'suredonation_donation_refunded', absint( $donation_id ), $new_refunded - $old_refunded, $new_refunded, $payload ); -
/** * Fires when a donation's payment status changes. */ do_action( 'suredonation_donation_status_changed', absint( $donation_id ), $new_status, $old_status, $payload ); -
/** * Filters the donor avatar URL shown in campaign blocks. */ apply_filters( 'suredonation_donor_avatar_url', $avatar_url, [ 'email' => $email, 'is_anonymous' => (bool) $is_anonymous, 'size' => $size, ] ); -
/** * Fires after a WP user is created and linked to a donor. */ do_action( 'suredonation_donor_user_created', $user_id, $donor_id, $email ); -
/** * Filters the Elementor widget classes SureDonation registers. */ apply_filters( 'suredonation_elementor_widgets', $widget_classes ); -
/** * Filter attachments for outgoing notification emails. */ apply_filters( 'suredonation_email_attachments', [], $notification, $donation_data, $campaign, $donation_id, $event ); -
/** * Filter the RFC 5321 character limits enforced on the Email field. */ apply_filters( 'suredonation_email_field_char_limits', $defaults ); -
/** * Filters the time of day the weekly report is sent, in the site timezone. */ apply_filters( 'suredonation_email_report_time', self::DEFAULT_TIME ); -
/** * Filter the grouped smart tags offered in the email notification editor. */ apply_filters( 'suredonation_email_smart_tag_groups', $smart_tags['email_grouped'] ); -
/** * Filter the exchange rate for a donation currency. */ apply_filters( 'suredonation_exchange_rate', 0.0, $currency ); -
/** * Maximum number of campaigns exported in one pass. Bounds memory/time on * sites with a very large number of campaigns (each campaign also loads its * linked forms + meta). */ apply_filters( 'suredonation_export_campaigns_limit', 10000 ); -
/** * Whether the donations export is restricted to one-time donations. */ apply_filters( 'suredonation_export_one_time_only', true ); -
/** * Post meta keys that hold secrets. Every `_suredonation_*` meta travels in a * campaign export by default; a key registered here is stripped from the * export and ignored in an import file. Keys can only be added: the built-in * ones stay whatever this returns. */ apply_filters( 'suredonation_export_secret_meta_keys', $keys ); -
/** * Option sub-keys that hold secrets and must never be exported. The settings * blob is shared with SureDonation Pro and future gateways; each new * secret-bearing key must register here so it is stripped from every settings * export (and preserved on import). */ apply_filters( 'suredonation_export_secret_option_keys', $keys ); -
/** * Filter the stored validation config for a field block. */ apply_filters( 'suredonation_field_block_config', $processed_config, $block_name, $block['attrs'], $blocks ); -
/** * Filter the form style CSS custom properties before they are serialized onto * the `.sd-form-container` wrapper. */ apply_filters( 'suredonation_form_style_vars', $vars, (int) $form_id, $settings ); -
/** * Filter the gateway configuration served to the donation form at runtime. */ apply_filters( 'suredonation_frontend_gateway_config', $config, $form_id, $mode ); -
/** * Filter whether a gateway can settle in a currency. */ apply_filters( 'suredonation_gateway_supports_currency', true, $gateway, $currency ); -
/** * Maximum number of campaigns imported in one request. This path runs * synchronously (2x wp_update_post per campaign) with no rollback, so a very * large payload is capped to avoid a mid-import timeout. */ apply_filters( 'suredonation_import_campaigns_limit', 1000 ); -
/** * Fires after each migration batch is processed (running or final). */ do_action( 'suredonation_import_charitable_batch_complete', $import_id, $progress ); -
/** * Filter the map of phase => mapper class. */ apply_filters( 'suredonation_import_charitable_phase_mappers', $mappers ); -
/** * Filter the phases that a Charitable migration session will run. */ apply_filters( 'suredonation_import_charitable_phases', $phases, $options ); -
/** * Fires after a new Charitable migration session has been created. */ do_action( 'suredonation_import_charitable_session_created', $progress['import_id'], $progress ); -
/** * Fires once when an import session completes. Pro uses this to finalize the * history record and remap recurring renewal → parent links. */ do_action( 'suredonation_import_complete', $import_id, $progress ); -
/** * Fires after an imported donation is inserted. Pro uses this to track created * rows (for rollback) and old→new id mapping (to relink recurring renewals * on completion). */ do_action( 'suredonation_import_donation_inserted', $donation_id, $data, $donation ); -
/** * Filter the donation row before it is inserted. Pro uses this to add * subscription fields (subscription_id, subscription_status, donation_type) * from the mapped CSV row. */ apply_filters( 'suredonation_import_donation_row', $donation, $data ); -
/** * Fires after each migration batch is processed (running or final). */ do_action( 'suredonation_import_givewp_batch_complete', $import_id, $progress ); -
/** * Filter the map of phase => mapper class. */ apply_filters( 'suredonation_import_givewp_phase_mappers', $mappers ); -
/** * Filter the phases that a GiveWP migration session will run. */ apply_filters( 'suredonation_import_givewp_phases', $phases, $options ); -
/** * Fires after a new GiveWP migration session has been created. */ do_action( 'suredonation_import_givewp_session_created', $progress['import_id'], $progress ); -
/** * Filter the import phase => mapper-class map. Pro registers its own phases * (e.g. subscriptions) here. */ apply_filters( 'suredonation_import_phase_mappers', $mappers ); -
/** * Fires when an import session is created (before the first batch). Pro uses * this to open an import-history record. */ do_action( 'suredonation_import_session_created', $import_id, $progress ); -
/** * Filter the curated donation payload passed to every integration hook. */ apply_filters( 'suredonation_integration_payload', $payload, $donation ); -
/** * Filter whether recurring donations are available. */ apply_filters( 'suredonation_is_recurring_available', $pro_compatible ); -
/** * Filters the endpoint. */ apply_filters( 'suredonation_metrics_subscribe_url', $url, $payload ); -
/** * Fires when a new donation record is created. */ do_action( 'suredonation_new_donation', $donation_id, $payload ); -
/** * Filter the user data before creating a WP user for a donor. */ apply_filters( 'suredonation_new_donor_user_data', $user_data, $donor_id, $email ); -
/** * Fires after onboarding lead-capture details are persisted. */ do_action( 'suredonation_onboarding_user_details_saved', $payload ); -
/** * Filter whether SureDonation outputs social meta tags for this campaign. */ apply_filters( 'suredonation_output_campaign_meta_tags', true, $campaign_id ); -
/** * Filter the label on the "make it recurring" opt-in checkbox. Defaults to the * admin-configured `recurringToggleLabel` block attribute. */ apply_filters( 'suredonation_payment_recurring_toggle_label', $this->recurring_toggle_label, $this->block_id ); -
/** * Filter the labels on the donor's one-time/recurring chooser. */ apply_filters( 'suredonation_payment_type_chooser_labels', $labels, $interval, (int) $form_id ); -
/** * Filter the license key sent to middleware for platform fee calculation. Pro * injects its license key for 0% fees. */ apply_filters( 'suredonation_paypal_license_key', '' ); -
/** * Filter PayPal SDK arguments. */ apply_filters( 'suredonation_paypal_sdk_args', $sdk_args, absint( $form_id ), $variant ); -
/** * Filter the webhook event types to subscribe to. */ apply_filters( 'suredonation_paypal_webhook_events', [ 'CHECKOUT.ORDER.APPROVED', 'PAYMENT.CAPTURE.COMPLETED', 'PAYMENT.CAPTURE.DENIED', 'PAYMENT.CAPTURE.REFUNDED', 'BILLING.SUBSCRIPTION.CREATED', 'BILLING.SUBSCRIPTION.ACTIVATED', 'BILLING.SUBSCRIPTION.UPDATED', 'BILLING.SUBSCRIPTION.CANCELLED', 'BILLING.SUBSCRIPTION.SUSPENDED', 'BILLING.SUBSCRIPTION.EXPIRED', 'BILLING.SUBSCRIPTION.PAYMENT.FAILED', 'PAYMENT.SALE.COMPLETED', 'PAYMENT.SALE.REFUNDED... ); -
/** * Allow extensions to handle additional webhook events. */ apply_filters( 'suredonation_paypal_webhook_handle_event', null, $event_type, $event_resource, $mode ); -
/** * Global kill-switch for the third-party IP geolocation lookup. */ apply_filters( 'suredonation_phone_geo_enabled', true ); -
/** * Fires when a personal-data erasure request has been processed for * SureDonation data. */ do_action( 'suredonation_privacy_data_erased', [ 'items_removed' => $items_removed, 'items_retained' => $items_retained, 'erase_failed' => $erase_failed, ] ); -
/** * Fires when a personal-data export including SureDonation data completes. */ do_action( 'suredonation_privacy_data_exported' ); -
/** * Filter the filename a donor sees when a receipt is delivered. */ apply_filters( 'suredonation_receipt_download_filename', $default_filename, $donation ); -
/** * Filter the receipt PDF filename ON DISK. */ apply_filters( 'suredonation_receipt_filename', $default_filename, $donation, $donor ); -
/** * Fires after a receipt PDF has been generated and stored. */ do_action( 'suredonation_receipt_generated', $donation_id, $filepath, $donation ); -
/** * Filter the receipt HTML before PDF generation. */ apply_filters( 'suredonation_receipt_html', $html, $donation, $donor ); -
/** * Filter the mPDF configuration used for receipt generation. */ apply_filters( 'suredonation_receipt_mpdf_config', $config, $donation, $donor ); -
/** * Fires after the mPDF instance is created, before the receipt HTML is * written. */ do_action( 'suredonation_receipt_mpdf_instance', $mpdf, $donation, $donor ); -
/** * Filter to add and register additional blocks. */ apply_filters( 'suredonation_register_additional_blocks', [] ); -
/** * Filter the registered payment methods and their display config. */ apply_filters( 'suredonation_registered_payment_methods', $methods, $this->payment_methods, $this->block_id ); -
/** * Filter REST API endpoints. */ apply_filters( 'suredonation_rest_api_endpoints', $endpoints ); -
/** * Short-circuit filter to disable receipt generation for a donation. */ apply_filters( 'suredonation_should_generate_receipt', true, $donation ); -
/** * Filter the smart-tag catalogue grouped by context. */ apply_filters( 'suredonation_smart_tags', $smart_tags ); -
/** * Filter the list of reasons a Stripe account cannot be disconnected. */ apply_filters( 'suredonation_stripe_account_usage_blockers', [], $account_id ); -
/** * Filter the Stripe events the webhook endpoint subscribes to. */ apply_filters( 'suredonation_stripe_webhook_events', $events ); -
/** * Filters the submitted fields as they will be stored on the donation. */ apply_filters( 'suredonation_submitted_field_data', $fields, $form_id ); -
/** * Filter the configuration payload passed to the OttoKit embed. */ apply_filters( 'suredonation_suretriggers_integration_data_filter', $body, $campaign_id, $form_id ); -
/** * Filter donation update data before saving. */ apply_filters( 'suredonation_update_donation_data', $update_data, $request, $donation_id ); -
/** * Filter the block types that participate in field validation. */ apply_filters( 'suredonation_validatable_blocks', self::VALIDATABLE_BLOCKS ); -
/** * Filter the validation error for a single donation form field. */ apply_filters( 'suredonation_validate_field', $error, $value, $config, $form_id, $block_name ); -
/** * Filter the list of allowed validation-message keys. */ apply_filters( 'suredonation_validation_message_keys', array_keys( \SureDonation\Inc\Field_Validation::default_validation_messages() ) ); -
/** * Allow extensions to handle additional webhook events. */ apply_filters( 'suredonation_webhook_handle_event', null, $event_type, $event_data, $mode, $account_id ); -
apply_filters( "{$key}_tracking_enabled", $is_enabled ); -
apply_filters( 'suredonation_show_setup_gateway_notice', true ); -
apply_filters( 'suredonation_show_test_mode_notice', true ); -
apply_filters( "{$source}_white_label_options", array() ); -
do_action( 'astra_notice_after_markup' ); -
do_action( "astra_notice_after_markup_{$notice['id']}" ); -
do_action( 'astra_notice_before_markup' ); -
do_action( "astra_notice_before_markup_{$notice['id']}" ); -
do_action( "astra_notice_inside_markup_{$notice['id']}" ); -
apply_filters( 'bricks/frontend/disable_opengraph', ! empty( \Bricks\Database::$global_settings['disableOpenGraph'] ) ); -
do_action( 'bsf_admin_notice_after_markup' ); -
do_action( "bsf_admin_notice_after_markup_{$notice['id']}" ); -
do_action( 'bsf_admin_notice_before_markup' ); -
do_action( "bsf_admin_notice_before_markup_{$notice['id']}" ); -
do_action( "bsf_admin_notice_inside_markup_{$notice['id']}" ); -
apply_filters( 'bsf_admin_notices_user_cap_check', $cap_check ); -
apply_filters( 'bsf_core_stats', $this->get_default_stats() ); -
apply_filters( 'bsf_usage_tracking_enabled', true ); -
apply_filters( 'suredonation_block_registration_args', [ 'render_callback' => [ $this, 'render' ] ] ); -
apply_filters( 'suredonation_deactivation_survey_data', [ [ 'id' => 'deactivation-survey-suredonation', 'popup_logo' => SUREDONATION_URL . 'images/suredonation-icon.svg', 'plugin_slug' => 'suredonation', 'popup_title' => __( 'Quick Feedback', 'suredonation' ), 'support_url' => 'https://suredonation.com/support/', 'popup_description' => __( 'If you have a moment, please share why you are deactivating SureDonation:', 'suredonation' ), 'show_on_screens... ); -
apply_filters( 'suredonation_editor_payment_gateways', [ [ 'value' => 'stripe', 'label' => __( 'Stripe', 'suredonation' ), 'supports_recurring' => true, ], [ 'value' => 'offline', 'label' => __( 'Offline Donations', 'suredonation' ), 'supports_recurring' => false, ], ] ); -
do_action( 'suredonation_email_sent', $donation_id, $to_email, $sent, $notification_name ); -
apply_filters( 'suredonation_email_smart_tags', $tags, $donation_data, $campaign ); -
apply_filters( 'suredonation_payment_gateways', [ 'stripe' => [ 'label' => __( 'Stripe', 'suredonation' ), 'description' => __( 'Accept payments via Stripe', 'suredonation' ), 'enabled' => true, 'supports_recurring' => true, ], 'offline' => [ 'label' => __( 'Offline Donations', 'suredonation' ), 'description' => __( 'Accept offline donations', 'suredonation' ), 'enabled' => true, 'supports_recurring' => false, ], ] ); -
apply_filters( 'suredonation_phone_geo_api_hourly_cap', 40 ); -
apply_filters( 'suredonation_show_review_notice_donation', true ); -
apply_filters( 'suredonation_show_review_notice_gateway', true ); -
apply_filters( 'suredonation_stripe_webhook_ips', [ '3.18.12.0/26', '3.130.192.0/25', '13.235.14.237/32', '13.235.122.149/32', '18.211.135.69/32', '35.154.171.200/32', '52.15.183.38/32', '54.88.130.119/32', '54.88.130.237/32', '54.187.174.169/32', '54.187.205.235/32', '54.187.216.72/32', ] ); -
apply_filters( 'suretriggers_get_iframe_url', SUREDONATION_SURETRIGGERS_INTEGRATION_BASE_URL ); -
apply_filters( 'suretriggers_is_user_connected', '' ); -
apply_filters( 'uds_default_deactivation_reasons', array( 'temporary_deactivation' => array( 'label' => esc_html__( 'This is a temporary deactivation for testing.' ), 'placeholder' => esc_html__( 'How can we assist you?' ), 'show_cta' => 'false', 'accept_feedback' => 'false', ), 'plugin_not_working' => array( 'label' => esc_html__( 'The plugin isn\'t working properly.' ), 'placeholder' => esc_html__( 'Please tell us more about what went wrong?'... ); -
apply_filters( 'uds_survey_allowed_screens', array( 'plugins' ) ); -
apply_filters( 'uds_survey_vars', array( 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ), '_ajax_nonce' => wp_create_nonce( 'uds_plugin_deactivate_feedback' ), '_current_theme' => function_exists( 'wp_get_theme' ) ? wp_get_theme()->get_template() : '', '_plugin_slug' => array(), ) );
Generated from SureDonation'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: