Skip to content

Developers

CampaignSuite is built to be extended with standard WordPress actions and filters. This section lists every hook the two plugins currently offer.

Plugin What it does Hooks
CampaignSuite Core The platform: settings pages, CampaignSuite entries and payments, the background action queue, and the Salesforce/FinDock and Mautic connections. It contains no Gravity Forms code. Core hooks
CampaignSuite Forms Everything around Gravity Forms: the CampaignSuite fields, the Feed, FinDock, Prefill and Measurement add-ons, and one-click links. Forms hooks

Add your callbacks to a small custom plugin (or a must-use plugin in wp-content/mu-plugins/) rather than to your theme, so they keep working when the theme changes.

<?php
/**
* Plugin Name: My CampaignSuite customisations
*/
add_filter('cs_action_max_attempts', function ($max_attempts) {
return 5;
});
  • CampaignSuite Core loads on plugins_loaded at the earliest priority, and CampaignSuite Forms loads right after it.
  • Code in CampaignSuite Forms that depends on Gravity Forms waits for Gravity Forms’ gform_loaded action.
  • The cs_init action fires at the end of CampaignSuite Core’s own callback on the WordPress init action (priority 10). Add your callback before that: when your plugin file loads, on plugins_loaded, or on init with a priority below 10.
  • Most other hooks run later in the request, so you can also register them on plugins_loaded or init.
  • All hooks start with cs_. Hooks in CampaignSuite Forms start with cs_forms_.
  • Some hook names are dynamic and are written here with a placeholder, for example cs_entry_list_column_{column_name} or cs_forms_prevent_prefill_{form_id}. Replace the placeholder with the concrete value, such as a column name or a form ID.
  • Where a dynamic hook has a general counterpart (for example cs_forms_prevent_prefill next to cs_forms_prevent_prefill_{form_id}), the specific one runs first and the general one receives its result.