Seamless Donations

Seamless Donations actions and filters

Seamless Donations 4.0 and above support a wide range of actions and filters, allowing you to modify the behavior of the plugin on the fly. Please do not modify the core plugin. Regular plugin updates will overwrite any changes you make to the core. If you need a special hook, don’t hesitate to ask.

Front-end form filters

The following hooks allow you to safely modify every aspect of the front-end form via filters. Each of these is passed the form array, which can be modified, and then returned to the form generator.

seamless_donations_form_donation_section: modifies the form array for the donation section

seamless_donations_form_tribute_section: modifies the form array for the tribute section

seamless_donations_form_donor_section: modifies the form array for the donor information section

seamless_donations_form_billing_section: modifies the form for the donor billing section

seamless_donations_admin_[tab-name]_before: called before the tab and menu are instantiated

seamless_donations_admin_[tab-name]_after: called after all of the other tab display operations are completed

seamless_donations_admin_settings_before_tweaks: specifically applies to the settings tab to allow elements to be placed before the Tweaks and Debug mode section (which generally should be at the bottom of the full list of settings)

These filters are now also available:

seamless_donations_admin_[tab-name]_menu: passes the full menu array prior to instantiating the menu

These filters are enormously powerful because they allow complete control of everything on the admin UI tabs for Seamless Donations.

The actual contents of the arrays are managed by Admin Page Framework (a product framework licensed by Seamless Donations) so you can easily add (or remove) a wide variety of features at any point in the admin page. Documentation for Admin Page Framework can be found here.

Admin forms validation filter

You can process admin form validations for any button pressed in the Seamless Donations admin UI. The filter is validate_page_slug_[page_slug_name]. For example, if a page’s slug is seamless_donations_funds, it calls the filter validate_page_slug_seamless_donations_funds. The filter takes three parameters:

the array of data submitted with the form

the array of data already in the database associated with the form

the setup object, which is the class (for things like setting error messages)

Custom post type filters

Fund, donor, and donation custom post types have a number of filters you can use: