Charitable Documentation

Learn how to make the most of Charitable with clear, step-by-step instructions.

Hooks and filters in Ambassadors

Please note: This documentation is a work in progress and does not yet cover all filters & action hooks available in Charitable Ambassadors. If you do not see a hook or filter describing what you need to do, please get in touch via our support page and we can help you.

Filters

charitable_ambassadors_fundraiser_title

Added in version 2.0.0

u003cpu003eChange the automatically generated title for a new fundraiser, when the title is set to be dynamically based on the campaign creator’s name.u003c/pu003e

Return Value

u003cpu003eString. The title of the fundraiser.u003c/pu003e

Arguments

  • $title (string)

    u003cpu003eThe title. By default this will be the campaign creator’s full name.u003c/pu003e

  • $data (array)

    u003cpu003eThe submitted data.u003c/pu003e

Usage

add_filter( 'charitable_ambassadors_fundraiser_title', function( $title, $data ) {n    $first_name = array_key_exists( 'first_name', $data ) ? $data['first_name'] : '';n    $last_name  = array_key_exists( 'last_name', $data ) ? $data['last_name'] : '';n    $full_name   = trim( sprintf( '%s %s', $first_name, $last_name ) );nn    // Joe Blow's Fundraisern    return sprintf( u0022%s's Fundraiseru0022, $full_name );n}, 10, 2 );

Added in version 2.0.0

u003cpu003eChoose whether you want to show the u0022Create a New Campaignu0022 button at the bottom of the output of the [charitable_my_campaigns] shortcode.u003c/pu003e

Return Value

u003cpu003eBoolean. True if you do want to show it, or false if you would prefer not to. This will return true by default.u003c/pu003e

Arguments

  • $show (boolean)

    u003cpu003eWhether to show the button.u003c/pu003e

Usage

// Do not show the button.nadd_filter( 'charitable_ambassadors_my_campaigns_show_campaign_creation_link', '__return_false' );

charitable_ambassadors_my_campaigns_button_text

Added in version 1.0.0

u003cpu003eChange the text of the u0022Create a Campaignu0022 button at the bottom of the [charitable_my_campaigns] shortcode.u003c/pu003e

Return Value

u003cpu003eString. The text to use in the button.u003c/pu003e

Arguments

  • $text (string)

    u003cpu003eThe button text.u003c/pu003e

Usage

add_filter( 'charitable_ambassadors_my_campaigns_button_text', function( $text ) {n    return 'Start a New Campaign';n} );

Added in version 1.0.0

u003cpu003eChange the page that users will be redirected to after they submit their campaign for the first time. Note that if you want to redirect to a static page, you can do this without code by configuring the u0022Campaign Submission Success Pageu0022 setting under Charitable u003e Settings u003e Ambassadors.u003c/pu003e

Return Value

u003cpu003eString. A URL to redirect to after first submitting a campaign. Note that the redirect is done through a call to u003ccodeu003ewp_safe_redirect()u003c/codeu003e, so the URL should be to an allowed host (see u003ca href=u0022https://developer.wordpress.org/reference/functions/wp_safe_redirect/u0022u003ehttps://developer.wordpress.org/reference/functions/wp_safe_redirect/u003c/au003e).u003c/pu003e

Arguments

  • $default (string)

    u003cpu003eThe URL to redirect to.u003c/pu003e

  • $args (array)

    u003cpu003eAn array of arguments. By default, this will only have a u003ccodeu003ecampaign_idu003c/codeu003e property with the ID of the newly submitted campaign.u003c/pu003e

Usage

// Redirect to the newly submitted campaign after submission.nadd_filter( 'charitable_permalink_campaign_submission_success_page', function( $url, $args = array() ) {n    if ( ! array_key_exists( 'campaign_id', $args ) ) {n        return $url;n    }nn    return get_permalink( $args['campaign_id'] );n}, 10, 2 );

charitable_campaign_submission_redirect_url

Added in version 1.0.0

u003cpu003eChange the URL that users are redirected to after they submit, update or save u0026amp; preview their campaign.u003c/pu003eu003cpu003eIf you only want to change the page that users are redirected to after they first submit their campaign, use the u003ca href=u0022https://www.wpcharitable.com/documentation/hooks-filters-in-ambassadors/#charitable_permalink_campaign_submission_success_pageu0022u003echaritable_permalink_campaign_submission_success_pageu003c/au003e filter instead.u003c/pu003e

Return Value

u003cpu003eString. The URL that the user will be redirected to.u003c/pu003e

Arguments

  • $url (string)

    u003cpu003eThe URL that the user will be redirected to.u003c/pu003e

  • $data (array)

    u003cpu003eThe submitted data.u003c/pu003e

  • $campaign_id (int)

    u003cpu003eThe campaign ID.u003c/pu003e

  • $user_id (int)

    u003cpu003eThe user ID.u003c/pu003e

charitable_ambassadors_fundraiser_form_field_list

Added in version 2.1.0

u003cpu003eAdd or remove fields to the fundraiser form. u003c/pu003eu003cpu003eThe fields list is a list of keys of fields that are included in the main campaign form, which should also be included in the fundraiser form. The following fields are not included in the fundraiser form by default:u003c/pu003eu003cpu003e- u003ccodeu003edescriptionu003c/codeu003eu003cbru003e- u003ccodeu003ecategoriesu003c/codeu003eu003cbru003e- u003ccodeu003etagsu003c/codeu003eu003cbru003e- u003ccodeu003esuggested_donationsu003c/codeu003eu003cbru003e- u003ccodeu003eallow_custom_donationsu003c/codeu003eu003c/pu003e

Return Value

u003cpu003earrayu003c/pu003e

Arguments

  • $list (array)

    u003cpu003eThe list of fields to be included.u003c/pu003e

  • $form (Charitable_Ambassadors_Fundraiser_Form)

    u003cpu003eThe fundraiser form object.u003c/pu003e

Usage

// Include the 'description' field in the Fundraiser form.nadd_filter( 'charitable_ambassadors_fundraiser_form_field_list', function( $fields ) {n    $fields[] = 'description';n    return $fields;n} );

charitable_ambassadors_fundraiser_inherited_fields

Added in version 2.0.0

u003cpu003eFilter the fields that are automatically inherited from the fundraiser’s parent campaign.u003c/pu003e

Return Value

u003cpu003earrayu003c/pu003e

Arguments

  • $fields (array)

    u003cpu003eThe inherited fields.u003c/pu003e

Usage

add_filter(n    'charitable_ambassadors_fundraiser_inherited_fields', n    function( $fields ) {n        $fields[] = 'my_custom_field';n        return $fields;n    }n);

charitable_ambassadors_update_fundraiser_end_dates_on_parent_end_date_change

Added in version 2.0.0

u003cpu003eSet whether end dates of fundraisers should be updated automatically when a parent campaign has its end date changed.u003c/pu003e

Return Value

u003cpu003eBoolean. Defaults to true.u003c/pu003e

Arguments

  • $should_update (boolean)

    u003cpu003eWhether to update automatically.u003c/pu003e

  • $campaign (Charitable_Campaign)

    u003cpu003eThe parent campaign object.u003c/pu003e

charitable_ambassadors_creator_donations_export_columns

Added in version 2.0.0

u003cpu003eFilter the columns that are included in the export.u003c/pu003e

Return Value

u003cpu003eArray. The keys of columns to include.u003c/pu003e

Arguments

  • $columns (array)

    u003cpu003eThe columns to include.u003c/pu003e

Usage

add_filter( 'charitable_ambassadors_creator_donations_export_columns', function( $columns ) {n    // Only show the first name, last name, amount and donor comment.n    $included_columns = array(n        'first_name',n        'last_name',n        'amount',n        'donor_comment',n    );ntn    foreach ( $columns as $column =u003e $header ) {n        if ( ! in_array( $column, $included_columns ) ) {n            unset( $columns[ $column ] );n        }n    }ntn    return $columns;n} );

Still have questions? We’re here to help!

Last Modified:

What's New In Charitable

View The Latest Updates
🔔 Subscribe to get our latest updates
📧 Subscribe to Emails

Email Subscription

Join our Newsletter

We won’t spam you. We only send an email when we think it will genuinely help you. Unsubscribe at any time!

Integration page builder

Divi Fans Rejoice! Native Divi 5 Campaign Progress Bar Module!

With our new native Divi 5 module, you can anchor your microsites with real-time fundraising stats directly on the visual canvas. Here’s how it works, and why it’s worth turning on today.

Create campaign updates that are VISUAL AND LIVE. You can also:

📊 Campaign Progress Bar: Drop a live progress bar into any Divi 5 layout and show goal progress in real time.

🎨 Deep styling controls: Easily customize the bar and track color, height, and radius to match your brand perfectly.

👁️ Visual Builder ready: Configure and preview everything directly on the Divi canvas as a first-class module.

🔁 Identical rendering: The same exact engine powers this module, meaning consistent design without legacy shims.

✅ Faster launches: Never leave the Divi 5 interface to configure shortcodes or guess how your goal labels will look.

Learn more here.

Integration page builder

👉🏻 New in Charitable: Native Elementor Widgets for Seamless Campaign Building

With native Elementor widgets, you design donation campaigns right alongside the rest of your page without touching code. Here’s how it works, and why it’s worth turning on today.

Create fundraising pages that are VISUAL, NATIVE, AND SHORTCODE-FREE. You can also:

⚡ Mini Donation: Add a compact, high-converting donation widget with preset amounts and full color control.

⏳ Campaign Countdown: Build urgency for a deadline-driven appeal, complete with optional confetti when the goal is hit.

📣 Donation Feed: Prove momentum by showing visitors the social proof of real people giving right now.

🏆 Donor Leaderboard: Celebrate top supporters with gold, silver, and bronze styling to spark friendly giving.

🖼️ Campaign Showcase: Feature multiple campaigns in a landing page grid or carousel, with search, filters, and badges.

Learn more here.

Addon New

🗒️ Custom Receipts… New Addon!

With Custom Receipts, you decide which page your donors see, on every campaign. Here’s how it works, and why it’s worth turning on today.

Left side shows a donation receipt with donation number, date, total, and payment method for a  gift to Anywhere, titled 'One Family Gets Clean Water For A Week.'

Create receipts that are CUSTOM TO THE DONOR OR CAMPAIGN. You can also:

📅 Year-end appeal: Reinforce the goal and invite donors to share while momentum is high.

🎗️ Memorial or tribute campaign: Give a gentle, respectful thank-you that fits the moment.

💎 Major gifts: Show a special message only to donors who give above a threshold.

🔁 Recurring growth: Invite one-time donors to become monthly supporters right on the receipt.

🌍 Global campaigns: Surface a country-specific note, like a Gift Aid reminder, only where it applies.

Learn more here.

New templates

🤩 New Beacon Campaign Templates w/ “Hero” Block!

With the new Beacon Campaign Templates for Charitable Pro, you can launch a stunning, full-width fundraising page that instantly captures visitor attention above the fold.

Fundraising page header for Save Maple Grove Park with a donation widget and a small square photo of a sunlit tree thumbnail on the left.

🔦 Above-the-Fold Impact: Lead with a full-width hero image, your logo, and your goal with a donation widget locked right on top of the banner so your ask and momentum register instantly without scrolling.

📐 Two Flexible Layouts: Choose between a structured two-column layout for side-by-side storytelling and supporting details, or a clean one-column view designed for uninterrupted long-form narratives.

⚡ All-in-One Hero Field: Powered by the new Campaign Hero field, bringing background media, live progress bars, custom donation amounts, and recurring giving tabs together into a single cohesive block that can be dropped into any layout.

🎨 Automatic Theme Matching: The hero banner and donation widget automatically inherit your campaign theme’s button and accent colors, ensuring your entire presentation stays beautifully on-brand without touching a line of CSS.

Learn more here.

donation form Feature New

📝 Donation Form Block: Embed a Working Donation Form Anywhere

With the new Donation Form Block for Charitable Pro, you can drop a fully working donation form directly onto any page or post in the WordPress block editor. No redirects, no page reloads, and zero friction between reading your story and making a contribution.

📝 Drop Forms Anywhere: Place a working form directly onto your homepage, inside a story-driven blog post, on a dedicated landing page, or within a campaign announcement.

🎯 Dynamic Campaign Binding: Easily choose a specific campaign from the block sidebar or set it to automatically bind to whichever campaign is currently being viewed.

📐 Full vs. Minimal Form Views: Switch between a full layout or a compact minimal view to perfectly fit sidebars, narrow columns, or wide landing pages.

🎨 Scoped No-Code Styling: Customize typography, container spacing, border radius, amount buttons, and accent colors independently for every form instance without touching a line of CSS.

Learn more here.