Charitable Documentation

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

Charitable Divi Integration

This guide is a technical reference for developers working with Charitable’s Divi integration. Divi integration was introduced in Charitable Pro 1.8.12.

Overview

This guide is a reference for using and extending Charitable’s Divi integration. The Divi integration was introduced in Charitable Pro 1.8.12 and rebuilt with native Divi 5 modules in the 1.8.16 series.

Charitable adds its own module category to the Divi Builder so you can drop campaigns, donation forms, donate buttons, and several fundraising widgets straight onto a Divi layout, with full Divi design controls and live preview in the Visual Builder.

Architecture

The integration ships two parallel sets of modules:

  • Native Divi 5 modules (includes/divi/d5-modules/) implement Divi 5’s DependencyInterface and register throughModuleRegistration. They render and live-preview natively inside the Divi 5 Visual Builder canvas, with no “Legacy” badge.
  • Legacy Divi 4 modules (includes/divi/modules/) extend ET_Builder_Module. They are used on Divi 4 sites and remain available on Divi 5 for backward compatibility.

On a Divi 5 site, Charitable registers the native Divi 5 modules and skips registering the legacy modules, so each module appears only once in the picker. On a Divi 4 site, the legacy modules are used. Layouts saved with Divi 4 modules auto-migrate to the matching native Divi 5 module with no visual drift.

Divi 4 vs Divi 5 Compatibility

Charitable supports both Divi 4.x and Divi 5.x.

Divi 4Divi 5
Module APIET_Builder_Module (legacy)DependencyInterface / ModuleRegistration (native)
Modules availableThe original 4All 9
Visual Builder previewStandardLive, through Divi’s React Style API
Saved Divi 4 layoutsRender as-isAuto-migrate to native Divi 5 modules

Important: the four original modules (Donate Button, Donation Form, Campaign, Campaigns) are available on both Divi 4 and Divi 5. The five additional modules (Campaign Showcase, Donation Feed, Campaign Countdown, Mini Donation Widget, Donor Leaderboard) are Divi 5 only native modules. On a Divi 4 site, use the matching Gutenberg block or shortcode instead.

Available Modules

Open the Divi Builder and look for the Charitable module category. The following modules are available.

Core modules (Divi 4 and Divi 5)

Charitable Donate Button A donate button or text link for a specific campaign. Options include the campaign, button label, display type (button or link), alignment, and open in a new tab, plus the full set of Divi design controls.

Charitable Donation Form An embedded donation form for a campaign. Choose the campaign and the form type (Full or Minimal), then style the content, amount buttons, donate button, accents, and typography with Divi design controls.

Charitable Campaign A single campaign with its title, description, fundraising progress, and donate action. Select the campaign and style every element through Divi.

Charitable Campaigns A grid or list of multiple campaigns. Controls cover how many campaigns to show, ordering, category and creator filtering, columns, and per-card styling.

Additional modules (Divi 5 only)

Charitable Campaign Showcase A browsable showcase of campaigns with built-in browse controls (AJAX filtering and search), display options, and a configurable query loop. Useful when you want visitors to explore many campaigns on one page. Setting groups: Loop, Display, Browse Controls.

Charitable Donation Feed A live feed of recent donations in a list or card layout, with query loop controls, display options, behavior settings (such as pagination and live polling), and typography and color controls. Great for social proof. Setting groups: Loop, Display, Behavior, Typography & Colors.

Charitable Campaign Countdown A countdown timer to a campaign’s end date, rendered as days, hours, minutes, and seconds. Choose which time units to show, set the content and colors, and enable an end-date celebration effect. Setting groups: Content, Time Units, Countdown Colors, Behavior.

Charitable Mini Donation Widget A compact donation widget you can place anywhere. Set one-time and optional monthly amount presets with a default, customize the call-to-action button, and style the widget appearance and container, including background color and border. On submit it can redirect to the donation page or open a modal. Setting groups: Content, Amount Presets, Call To Action, Widget Appearance, Container, Typography.

Charitable Donor Leaderboard A leaderboard of top donors. Configure the header, the query loop and scope (per campaign or site-wide), who is included, the card or row layout, podium colors, and display options. Setting groups: Header, Loop / Scope, Inclusion, Cards / Rows, Podium Colors, Display.

The five Divi 5 modules reuse the same server-side renderers as their matching Gutenberg blocks, so output is identical whether you build with Divi or the block editor.

Disabling the Integration

To completely disable the Divi integration, add this constant to wp-config.php:

define( ‘CHARITABLE_DISABLE_DIVI_INTEGRATION’, true );

This prevents the integration from loading entirely, which can be useful for:

  • Troubleshooting conflicts
  • Sites not using Divi
  • Custom implementations

Module Slugs

Native Divi 5 module names (registered through ModuleRegistration):

ModuleDivi 5 module nameBacked by
Charitable Donate Buttoncharitable/donate-button[charitable_donate_button]
Charitable Donation Formcharitable/donation-form[charitable_donation_form]
Charitable Campaigncharitable/campaign[campaign]
Charitable Campaignscharitable/campaigns[campaigns]
Charitable Campaign Showcasecharitable/divi-campaign-showcasecharitable/campaign-showcaseblock render
Charitable Donation Feedcharitable/divi-donations-feed[charitable_donations_feed] / block render
Charitable Campaign Countdowncharitable/divi-campaign-countdown[charitable_campaign_countdown]/ block render
Charitable Mini Donation Widgetcharitable/divi-mini-donation-widget[charitable_mini_widget] / block render
Charitable Donor Leaderboardcharitable/divi-donor-leaderboard[charitable_donor_leaderboard] / block render

Legacy Divi 4 module slugs (extend ET_Builder_Module):

ModuleDivi 4 slug
Charitable Donate Buttoncharitable_donate_button
Charitable Donation Formcharitable_donation_form
Charitable Campaigncharitable_campaign
Charitable Campaignscharitable_campaigns

Hooks and Filters

Actions

Module Registration

// Modules are registered on this Divi hook

add_action( ‘et_builder_ready’, [ $this, ‘register_modules’ ] );

Cache Clearing

// Campaign options cache is cleared when campaigns change

add_action( ‘save_post_campaign’, [ $this, ‘clear_campaign_options_cache’ ] );

add_action( ‘delete_post’, [ $this, ‘clear_campaign_options_cache’ ] );

add_action( ‘wp_trash_post’, [ $this, ‘clear_campaign_options_cache’ ] );

Filters

Module Categories

// Custom category registration

add_filter( ‘et_builder_categories’, [ $this, ‘register_module_category’ ] );

Caching

The integration caches campaign dropdown options to improve performance:

  • Transient Key: charitable_divi_campaign_options
  • Duration: 1 hour (HOUR_IN_SECONDS)
  • Auto-cleared: When campaigns are saved, deleted, or trashed

To manually clear the cache:

delete_transient( ‘charitable_divi_campaign_options’ );

Visual Builder Considerations

Preview Mode

The Donation Form module displays a placeholder in the Visual Builder instead of the actual form. This is intentional because:

  1. Forms require JavaScript that may conflict with the builder
  2. Form submissions in preview mode could cause issues
  3. Performance is improved with static placeholders

The actual form renders correctly on the frontend.

AJAX Data Attributes

The Campaigns shortcode normally outputs data-shortcode-atts for AJAX pagination. In the Visual Builder context, this is stripped to prevent display issues. The integration detects the VB context and adds a preview=”1″ attribute to the shortcode.

Computed Fields

Each module uses Divi’s computed fields system for live previews:

‘__campaign_preview’ => [

    ‘type’                => ‘computed’,

    ‘computed_callback’   => [ ‘Charitable_Divi_Campaign_Module’, ‘get_campaign_preview’ ],

    ‘computed_depends_on’ => [

        ‘campaign_id’,

    ],

],

When a user changes a setting in the Visual Builder, Divi calls the computed callback via AJAX to refresh the preview.

CSS Selectors

Module Container Classes

ModuleContainer Class
Campaign.et_pb_charitable_campaign
Campaigns.et_pb_charitable_campaigns
Donation Form.et_pb_charitable_donation_form
Donate Button.et_pb_charitable_donate_button

Common Element Selectors

/* Campaign titles */

.et_pb_charitable_campaign .campaign-title,

.et_pb_charitable_campaigns .campaign-title { }

/* Progress bars */

.campaign-progress,

.progress-bar { }

/* Donate buttons */

.donate-button,

.charitable-button { }

/* Form fields */

.charitable-donation-form input[type=”text”],

.charitable-donation-form select { }

Debugging

Enable WordPress Debug Mode

// wp-config.php

define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_LOG’, true );

Common Issues

Modules not appearing in builder:

  • Verify Divi theme/plugin is active: function_exists( ‘et_setup_theme’ )
  • Check that Charitable is fully loaded before Divi initializes
  • Look for PHP errors in wp-content/debug.log

Styling not applying:

  • Clear Divi’s static CSS cache: Divi → Theme Options → Builder → Advanced → Static CSS File Generation
  • Check CSS specificity; Divi uses high specificity selectors
  • The integration uses !important on advanced field CSS for this reason

Campaign dropdown empty:

  • Ensure campaigns exist with “Published” status
  • Check if the transient cache needs clearing
  • Verify post_type_exists( ‘campaign’ ) returns true

Preview not updating:

  • Check browser console for JavaScript errors
  • Verify AJAX requests are completing (Network tab)
  • Ensure computed_depends_on includes the field being changed

Detection Methods

The integration uses multiple methods to detect Divi:

// Check for Divi Builder plugin

class_exists( ‘ET_Builder_Plugin’ )

// Check for Divi functions

function_exists( ‘et_setup_theme’ )

function_exists( ‘et_builder_should_load_all_module_data’ )

// Check for Divi/Extra theme

in_array( get_template(), [ ‘Divi’, ‘Extra’ ] )

Visual Builder Detection

// Frontend Visual Builder

isset( $_GET[‘et_fb’] )

// Backend builder

isset( $_GET[‘et_pb_preview’] )

// AJAX context (for preview rendering)

defined( ‘DOING_AJAX’ ) && DOING_AJAX

Extending the Integration

Adding Custom Fields to a Module

To add fields to an existing module via a child theme or plugin, you would need to extend the module class:

class My_Custom_Campaign_Module extends Charitable_Divi_Campaign_Module {

    public function get_fields() {

        $fields = parent::get_fields();

        // Add custom field

        $fields[‘custom_field’] = [

            ‘label’           => ‘My Custom Field’,

            ‘type’            => ‘text’,

            ‘option_category’ => ‘basic_option’,

            ‘toggle_slug’     => ‘main_content’,

        ];

        return $fields;

    }

}

Note: This requires re-registering the module, which is an advanced customization.

Custom Module Category Icon

The Charitable category icon is set via CSS injection rather than Divi’s icon property (which doesn’t support custom SVGs for categories):

li.charitable.et_pb_folder::before {

    content: ” !important;

    background-image: url(‘path/to/icon.svg’) !important;

    background-size: contain !important;

}

Version History

  • 1.8.16 series: Rebuilt the integration with native Divi 5 modules. The Donate Button, Donation Form, Campaign, and Campaigns modules became native Divi 5 modules (no more “Legacy” badge), with full Divi 5 design controls, campaign selection, Full/Minimal form types, and auto-migration of saved Divi 4 shortcodes. Added five Divi 5 only modules: Campaign Showcase, Donation Feed, Campaign Countdown, Mini Donation Widget, and Donor Leaderboard. Visual Builder canvas now live-previews every Divi design control through Divi’s React Style API.
  • 1.8.12: Divi Page Builder integration introduced with native Charitable modules for campaigns, donation forms, and buttons (Divi 4 legacy module API).

Support

For issues specific to the Divi integration:

  1. Check this documentation for known solutions
  2. Enable WP_DEBUG and check for errors
  3. Test with a default Divi layout to rule out theme conflicts
  4. Contact Charitable support with debug information

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 New

👤 Creator Profiles: Put a Face to Every Peer-to-Peer Campaign

Ambassadors 3.3.0 now provies Creator Profiles — giving your supporters a permanent, shareable public home that turns one-time fundraisers into ongoing relationships.

👤 Public Creator Pages: Give every fundraiser an instant, clean landing page at /creator/their-name/ to showcase their custom avatar, bio, and a browsable grid of their campaigns.

📊 Proof of Impact: Boost donor trust by displaying site-wide milestones on the profile—like total funds raised and total donor counts.

💳 Interactive Hover Cards: When donors hover over a creator’s name on a campaign page, a compact card expands with their bio and social handles right at the moment of decision.

📍 Responsible Location Sharing: Allow creators to safely show local supporters where they are based using only city, state, and country details.

🛠️ Self-Serve Customization: Fundraisers can update their own profiles and link up to six social networks directly from the My Campaigns hub, saving you admin time.

Ready to empower your advocates? Update to Ambassadors 3.3.0 and turn on “Enable Public Creator Page” today!

Improvement Payments

📱 Turn Mobile Scrollers Into Donors: Meet Charitable’s Mollie Upgrade

Losing mobile supporters because they hate typing out long card numbers on their phones? Charitable’s updated Mollie integration features:

⚡ One-Tap Wallet Checkout: Enable donors to complete their gifts instantly using Apple Pay or Google Pay with a simple face scan, fingerprint, or tap.

💰 No Extra PCI Burden: Skip complex domain verification and security compliance since all wallet transactions run safely through Mollie’s hosted checkout.

🛠️ Custom Cancel Routing: Keep the experience predictable by automatically sending donors who back out to your cancellation page, or use developer filters to route them to a custom page.

Visit this page to learn more.

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.