Charitable Documentation

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

The Email Fields API

The Email Fields API was introduced in version 1.5 and provides a cleaner way to add new email tags or modify existing ones.

Defining a Field

An email field is defined as an array with a few arguments, and a key which is used for the show parameter in the [charitable_email] shortcode.

Arguments

  • description: The description that will be shown for the email tag.
  • preview: The placeholder value that will be used for this email tag in email previews.
  • callback: A function that will be executed to get the tag value for a particular email.
  • value: A fixed value for the email tag. If this is set, callback will not be used and is not required.

In addition, an email field has a key which will be used when the tag is added.

Callback arguments

The callback function will receive three arguments:

  • $value: The default value (an empty string). This is provided primarily for backwards-compatibility purposes.
  • $args: The shortcode arguments. This will always include the show parameter but may include other arguments if these are applicable to the email tag.
  • $email: An instance of Charitable_Email. You can use this to get the objects associated with the email (usually one of Charitable_Campaign, Charitable_Donation or Charitable_User).

Adding a Campaign email field

Campaign email fields can be added using the charitable_email_campaign_fields filter:

function ed_charitable_email_campaign_field_callback( $value, $args, $email ) {
    $campaign = $email->get_campaign();

    return $campaign->get( 'some_field' );
}

function ed_charitable_add_email_campaign_field( $fields ) {
    $fields['some_field'] = array(
        'description' => 'A description of this field',                    
        'preview'     => 'Placeholder value',
        'callback'    => 'ed_charitable_email_campaign_field_callback',
    );

    return $fields;
}

add_filter( 'charitable_email_campaign_fields', 'ed_charitable_add_email_campaign_field' );

Adding a Donation email field

Donation email fields can be addd using the charitable_email_donation_fields filter:

function ed_charitable_email_donation_field_callback( $value, $args, $email ) {
    $donation = $email->get_donation();

    return $donation->get( 'some_field' );
}

function ed_charitable_add_email_donation_field( $fields ) {
    $fields['some_field'] = array(
        'description' => 'A description of this field',                    
        'preview'     => 'Placeholder value',
        'callback'    => 'ed_charitable_email_donation_field_callback',
    );

    return $fields;
}

add_filter( 'charitable_email_donation_fields', 'ed_charitable_add_email_donation_field' );

Adding a User email field

Defining a new user email field follows the exact same process, but with the charitable_email_user_fields filter:

function ed_charitable_email_user_field_callback( $value, $args, $email ) {
    $user = $email->get_user();

    return $user->get( 'some_field' );
}

function ed_charitable_add_email_user_field( $fields ) {
    $fields['some_field'] = array(
        'description' => 'A description of this field',                    
        'preview'     => 'Placeholder value',
        'callback'    => 'ed_charitable_email_user_field_callback',
    );

    return $fields;
}

add_filter( 'charitable_email_user_fields', 'ed_charitable_add_email_user_field' );

Modifying Existing Email Fields

Existing email fields can also be changed with these filters. For example, you can use this to change the callback for an existing tag, or to edit the description.

Changing a field’s callback

function ed_charitable_donor_address_email_field_callback( $value, $args, $email ) {
    // Return the donor's address.
}

function ed_charitable_set_donor_address_email_field_callback( $fields ) {
    $fields['donor_address']['callback'] = 'ed_charitable_donor_address_email_field_callback';
    return $fields;
}

add_filter( 'charitable_email_donation_fields', 'ed_charitable_set_donor_address_email_field_callback' );

Changing a field’s description

function ed_charitable_set_user_login_email_field_description( $fields ) {
    $fields['user_login']['description'] = 'My user login description';
    return $fields;
}

add_filter( 'charitable_email_donation_fields', 'ed_charitable_set_user_login_email_field_description' );

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!

ambassadors improved New

Moderation and Directory Screens In Ambassadors 3.0

Ambassadors 3.0 has new features: moderation and directory screens… now easily see those who are earning donations on your peer to peer network – including campaign creators that might need to be verified – all in one place. Generate reports, email ambassadors and campaign creators directly and more.

🚀 See when campaign creators and ambassadors have updated their campaigns, what donors/donation they have brought in and more.

🎉 Manually add ambassadors and campaign creators, and approve them in one-click!

Visit this page to learn more.

New Payments

⚡ Unlock India-Based Donations: Meet Charitable’s Native Razorpay Integration

Trying to collect donations in India? Charitable’s native Razorpay integration features:

⚡ Instant UPI Integration: Accept fast, local donations directly inside your form via apps like PhonePe, Google Pay, Paytm, and BHIM without sending donors away from your site.

📲 Auto-Generated Campaign QRs: Instantly render scannable QR codes encoding a UPI deep link directly on your public campaign pages and sidebars for an effortless “scan-to-give” experience.

💰 Dual Local & Global Reach: Headline your campaigns in INR while seamlessly accepting major international currencies like USD, EUR, GBP, and CAD to maximize global support.

🔁 Seamless Recurring Giving: Fully integrates with the Charitable Recurring addon to manage automatic monthly subscriptions directly through Razorpay without extra code.

↩️ Automatic Two-Way Sync: Keep your books perfectly clean with two-way refund syncing—issue a refund inside WordPress or your Razorpay dashboard and both sides update automatically.

🔒 Webhook-Verified Security: Automatically protect your donation records using HMAC-signed webhook verification to ensure every status update represents real money cleared on the rails.

Visit this page to learn more.

Integration New

🎉 New Built-in PushEngage Integration

Struggling with falling email open rates and rising ad costs just to keep your supporters engaged? Charitable’s built-in PushEngage integration features:

🔔 Zero-Fee Direct Messaging: Deliver crisp, instant pop-up notifications straight to your donors’ desktops and mobile devices.

⏱️ Four Smart Automated Triggers: Automatically send updates for immediate donation thank yous, full-list campaign launches, urgent “ending soon” alerts, and goal milestone celebrations.

📈 Group Momentum Broadcasts: Turn private milestones into public wins by automatically broadcasting alerts to your entire subscriber list the moment a campaign hits 50%, 75%, or 100% of its goal.

📊 Automatic Analytics Tracking: Monitor exactly where your incoming notification traffic is coming from with built-in attribution that requires zero complex configuration.

Visit this page to learn more.

New Security

💂‍♂️ New DonationGuard 🛡️ Automatically Protects Your Donations!

Worried about card testing attacks or spam bots flooding your donation forms, but don’t want to ruin the giving experience for your real supporters? Charitable’s DonationGuard features:

🛡️ Real-Time Bot Detection: Actively monitors every donation submission for five distinct attack signals without slowing down your human donors.

📊 Smart Traffic Scoring: Instantly evaluates activity against a learned baseline of your site’s normal donation rhythms to catch sneaky, slow-drip card testing.

🚨 Severity-Tiered Alerts: Immediately opens structured “Attack Records” and notifies you via email and admin alerts the moment a campaign starts taking fire.

🎯 Single-Click Defense: Deploy instant security using the “Recommended Settings” preset to turn on Honeypot, Time Trap, and Rate Limit modules all at once.

🚫 Automated Blocklists: Permanently stop repeat offenders by automatically blocking suspicious email addresses based on your customized rules.

Visit this page to learn more.

GiveWP Migrations New

🧤 White Glove Migration Service for GiveWP

Thinking about switching your fundraising platform from GiveWP to Charitable, but don’t want to risk losing your data or handle a complex technical setup yourself? Charitable’s White Glove Migration Service features:

👥 Flawless Donor Mapping: Safely transfer your entire supporter database with zero data loss.

📊 Complete Financial History: Meticulously preserve every historical transaction for continuous, accurate reporting.

🔄 Seamless Recurring Giving: Safely transfer active sustaining subscriptions without disrupting your incoming revenue or requiring your donors to update their information.

💳 Zero Gateway Disruptions: Keep using Stripe, PayPal, or any other GiveWP-compatible processor you already love.

🚀 Expert Technical Setup: Relax while our team handles the heavy lifting to install and configure your forms—plus, qualifying users get a full year of Charitable Pro completely free.

Visit this page to learn more.