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

The Charitable Divi integration provides four custom modules for the Divi Builder. The integration uses Divi’s legacy ET_Builder_Module API for maximum compatibility with both Divi 4 and Divi 5.

Architecture

The integration follows a similar pattern to Charitable’s Elementor and WPBakery integrations:

  • Main Integration Class: Singleton pattern, handles detection and module registration
  • Module Classes: Each module extends ET_Builder_Module
  • Shortcode-Based Rendering: Modules leverage existing Charitable shortcodes for output
  • Computed Fields: Used for Visual Builder live previews via AJAX

Divi 4 vs Divi 5 Compatibility

The integration is built on Divi’s legacy module API (ET_Builder_Module) rather than the newer Divi 5 ModuleRegistration system. This approach was chosen for:

  • Backward Compatibility: Works with both Divi 4 and Divi 5
  • Stability: Uses a well-documented, proven API
  • Simplicity: Leverages existing shortcode infrastructure

The integration has been tested with:

  • Divi Theme 4.x
  • Divi Theme 5.x
  • Divi Builder Plugin (standalone)
  • Extra Theme

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

ModuleSlugShortcode Used
Campaigncharitable_campaign[campaign id=”X”]
Campaignscharitable_campaigns[campaigns …]
Donation Formcharitable_donation_form[charitable_donation_form …]
Donate Buttoncharitable_donate_button[charitable_donate_button …]

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

VersionChanges
1.8.12Initial Divi integration release

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!

Improvement Payments

💳 New Braintree Features For Your European Donors

If your nonprofit serves international supporters, credit cards aren’t always their preferred way to give. With the release of the Braintree addon version 1.3.0, you can now empower your European donors with the payment methods they trust most.

What’s New:

🌍 Six New European Payment Methods: Seamlessly accept popular bank-based options like iDEAL (Netherlands), Bancontact (Belgium), BLIK (Poland), EPS (Austria), Przelewy24 (Poland), and MyBank (Italy/Portugal).

⚡ Frictionless Donor Experience: No manual card entries required. Donors safely authenticate directly with their own bank in a secure popup for lightning-fast contributions.

⚙️ Automatic Currency Sync: Skip complex configuration. The addon intelligently displays the correct local payment buttons based automatically on your site’s currency (EUR or PLN).

Ready to scale your global reach? Update to Braintree 1.3.0 today!

Campaigns New

⏳ Campaign Countdown: Drive Urgency and Lift Donations

Urgency is one of the most powerful tools in fundraising! Meet Campaign Countdown—a live, real-time timer built to turn procrastination into immediate generosity.

campaign_countdown_animation

What’s New:

⏱️ Live, Real-Time Urgency: Beautifully track days, hours, minutes, and seconds down to your campaign’s deadline w/ live-updating visual countdowns.

🎨 Tailored to Your Look: Choose between Boxed bordered tiles or a clean, single-line Inline display. Match your theme instantly with font and deep color controls.

🛠️ Place it Anywhere: Drop the countdown anywhere you like using the Campaign Builder field, a dedicated Gutenberg block, or a simple shortcode.

🚨 Smart Expiry Actions: Total control over the end state—choose to automatically replace the timer with a custom message, freeze it at zero, and more.

Improvement Migrations

↔️ Importing From GiveWP, Donorbox, GiveButter… even CSV!

Whether you’re migrating from another platform or consolidating your records, moving your data to Charitable is now faster and more flexible than ever. We’ve streamlined the process so you can bring over your entire fundraising history in just a few clicks.

🔄 Native GiveWP, Donorbox, & GiveButter Support: Switching from a major platform? Our dedicated migration tools handle the heavy lifting, automatically mapping your donors and donations directly into Charitable—no technical skills required.

📂 Universal CSV Import: Moving from a custom system or a specialized CRM? If you can export it to a CSV, you can import it here. Our smart mapping tool lets you align your columns to Charitable fields like names, emails, phone numbers, and addresses in seconds.

Instant Donor Profiles & Custom Tags: Automatically create rich donor profiles and bring in custom tags to keep your data organized. Segment and engage your supporters from day one with a clean, professional database structure.


Ready to make the switch?

Check out our GiveWP Migration Guide

Learn more about our Import Tools

Improvement Payments

💳 New Braintree Features For Your European Donors

With the release of Braintree addon version 1.3.0, you can now empower your European donors with the payment methods they trust and prefer, making giving seamless for international supporters.

🌍 Six New European Payment Methods: Support popular local options like iDEAL (Netherlands), Bancontact (Belgium), BLIK (Poland), and more to meet donors where they are.

⚡ Frictionless Donor Experience: These bank-based methods allow donors to authenticate directly with their own bank in a secure popup… no credit card numbers required.

⚙️ Automatic Currency Sync: No complex setup needed. The builder automatically displays the correct payment buttons based on your site’s currency (EUR or PLN), ensuring a relevant experience for every visitor.

Campaigns New

🖼️ Campaign Featured Images: Pro-Level Visuals Made Simple

With the new Campaign Featured Image setting in our visual builder, you now have a single, dedicated place to manage how your fundraisers look across your entire site and beyond.

🖼️ One Image, Everywhere: Set a primary thumbnail that automatically syncs to campaign grids, lists, and shortcodes—no more relying on layout order.

📱 Social Sharing Optimized: Easily upload images at the perfect size to ensure your campaigns look stunning and professional when shared on social media.

🔍 SEO & Accessibility Ready: Add custom alt text directly within the builder to improve search rankings and ensure your mission is accessible to every supporter.