Offer ends in:
  
Black Friday: 40% off your first year: 40% off on annual plans. Use code with BF2026 at checkout. View Plugins

All FreemKit actions and filters are listed here. Hooks follow the freemkit_ prefix convention. All hooks can be registered using standard WordPress add_action() / add_filter() calls, or via Hook_Registry::add_action() / Hook_Registry::add_filter() if extending from within the plugin.


Actions

Kit OAuth

freemkit_api_get_access_token

Fires after a Kit access token is successfully obtained.

do_action( 'freemkit_api_get_access_token', $result, $client_id );
ParameterTypeDescription
$resultarrayToken response from the Kit API
$client_idstringKit OAuth client ID

freemkit_api_refresh_token

Fires after a Kit access token is successfully refreshed.

do_action( 'freemkit_api_refresh_token', $result, $client_id, $prev_access_token, $prev_refresh_token );
ParameterTypeDescription
$resultarrayNew token response
$client_idstringKit OAuth client ID
$prev_access_tokenstringThe access token that was replaced
$prev_refresh_tokenstringThe refresh token that was replaced

freemkit_api_get_access_token_error

Fires when obtaining a Kit access token fails.

do_action( 'freemkit_api_get_access_token_error', $error, $client_id );
ParameterTypeDescription
$errorWP_ErrorThe error returned
$client_idstringKit OAuth client ID

freemkit_api_refresh_token_error

Fires when refreshing a Kit access token fails.

do_action( 'freemkit_api_refresh_token_error', $error, $client_id );
ParameterTypeDescription
$errorWP_ErrorThe error returned
$client_idstringKit OAuth client ID

Webhook Processing

freemkit_process_webhook_event

WP-Cron hook. Fires asynchronously to process a queued webhook event. Not intended to be called directly.

do_action( 'freemkit_process_webhook_event', $event_key );
ParameterTypeDescription
$event_keystringUnique key identifying the queued event (used to retrieve its transient payload)

Subscriber Lifecycle

freemkit_after_add_subscriber

Fires after a new subscriber is inserted into the local database.

do_action( 'freemkit_after_add_subscriber', $id, $subscriber );
ParameterTypeDescription
$idintNew subscriber ID
$subscriberSubscriberThe subscriber object

freemkit_after_update_subscriber

Fires after an existing subscriber record is updated.

do_action( 'freemkit_after_update_subscriber', $id, $subscriber, $existing );
ParameterTypeDescription
$idintSubscriber ID
$subscriberSubscriberThe updated subscriber object
$existingSubscriberThe subscriber object before the update

freemkit_delete_subscriber

Fires when a subscriber is deleted from the local database.

do_action( 'freemkit_delete_subscriber', $id, $subscriber );
ParameterTypeDescription
$idintThe ID of the deleted subscriber
$subscriberSubscriberThe subscriber object at time of deletion

Admin UI

freemkit_subscribers_page_header

Fires at the top of the Subscribers admin screen, before the list table. Use to inject custom notices or content.

do_action( 'freemkit_subscribers_page_header' );

freemkit_settings_form_buttons

Fires inside the settings form button area. Use to add custom buttons to the settings page.

do_action( 'freemkit_settings_form_buttons', $tab_id, $tab_name, $sections );
ParameterTypeDescription
$tab_idstringCurrent tab slug
$tab_namestringCurrent tab display name
$sectionsarraySettings sections on the current tab

freemkit_wizard_completed

Fires when the setup wizard is completed or skipped.

do_action( 'freemkit_wizard_completed', $prefix );
ParameterTypeDescription
$prefixstringPlugin prefix (freemkit)

freemkit_wizard_step_processed

Fires after each wizard step is saved.

do_action( 'freemkit_wizard_step_processed', $step, $settings );
ParameterTypeDescription
$stepintThe step number that was saved
$settingsarrayThe settings values saved in this step


Filters

Settings: Reading

freemkit_get_settings

Filters the entire settings array.

$settings = apply_filters( 'freemkit_get_settings', $settings );

freemkit_get_option

Filters the value of any single option.

$value = apply_filters( 'freemkit_get_option', $value, $key, $default );
ParameterTypeDescription
$valuemixedThe option value
$keystringThe option key
$defaultmixedThe default value

freemkit_get_option_{$key}

Filters the value of a specific option. Replace {$key} with the option key.

// Example: filter the kit_form_id option
add_filter( 'freemkit_get_option_kit_form_id', function( $value ) {
    return '12345';
} );

freemkit_settings_defaults

Filters the default values for all settings.

$defaults = apply_filters( 'freemkit_settings_defaults', $defaults );

Settings: Writing

freemkit_update_option

Filters an option value before it is saved.

$value = apply_filters( 'freemkit_update_option', $value, $key );

Settings: Registration

freemkit_registered_settings

Filters the complete registered settings definition array (used to build the settings form).

$settings = apply_filters( 'freemkit_registered_settings', $settings );

freemkit_settings_sections

Filters the list of settings tabs/sections.

$sections = apply_filters( 'freemkit_settings_sections', $sections );

freemkit_settings_kit

Filters the settings fields on the Kit tab.

$fields = apply_filters( 'freemkit_settings_kit', $fields );

freemkit_settings_general

Filters the settings fields on the Freemius tab. Despite the name, this filter controls the Freemius tab settings (the tab registered under the freemius section key).

$fields = apply_filters( 'freemkit_settings_general', $fields );

freemkit_settings_subscribers

Filters the settings fields on the Subscribers tab.

$fields = apply_filters( 'freemkit_settings_subscribers', $fields );

Webhook Behavior

freemkit_webhook_require_timestamp

Whether to reject incoming webhook payloads that have no timestamp. By default, missing timestamps are accepted. Return true to reject them.

$require = apply_filters( 'freemkit_webhook_require_timestamp', false, $request );
ParameterTypeDefaultDescription
$requireboolfalseWhether to reject requests with no timestamp
$requestWP_REST_Request|nullNot applicableThe incoming request object

freemkit_webhook_max_age

Maximum age in seconds for an incoming webhook event.

$max_age = apply_filters( 'freemkit_webhook_max_age', 900, $timestamp );
ParameterTypeDefaultDescription
$max_ageint900Maximum allowed age in seconds
$timestampintNot applicableThe timestamp extracted from the request

Default: 900 (15 minutes).


freemkit_webhook_replay_ttl

How long (in seconds) to retain the deduplication record for a processed event.

$ttl = apply_filters( 'freemkit_webhook_replay_ttl', DAY_IN_SECONDS, $event_key );
ParameterTypeDefaultDescription
$ttlint86400Dedup window in seconds (minimum enforced: 1 hour)
$event_keystringNot applicableThe unique key for this event

Default: 86400 (24 hours).


freemkit_webhook_max_retries

Maximum number of async retries after the initial attempt before an event is discarded. The default 3 allows four attempts in total.

$max = apply_filters( 'freemkit_webhook_max_retries', 3, $event_key );
ParameterTypeDefaultDescription
$maxint3Maximum retries after the initial attempt
$event_keystringNot applicableThe unique key for this event

Event Types

freemkit_default_free_event_types

Filters the default event types that identify a free user, used when no per-plugin override is set.

$types = apply_filters( 'freemkit_default_free_event_types', $defaults, $plugin_config );
ParameterTypeDefaultDescription
$defaultsarray['user.marketing.opted_in']Default free event types
$plugin_configarrayNot applicableThe plugin configuration array
add_filter( 'freemkit_default_free_event_types', function( $types, $config ) {
    $types[] = 'install.activated';
    return $types;
}, 10, 2 );

freemkit_default_paid_event_types

Filters the default event types that identify a paid user.

$types = apply_filters( 'freemkit_default_paid_event_types', $defaults, $plugin_config );

Default: ['license.created'].


freemkit_freemius_events

Filters the full list of available Freemius event types shown in autocomplete fields.

$events = apply_filters( 'freemkit_freemius_events', $events );

Wizard

freemkit_wizard_steps

Filters the array of setup wizard steps. Use to add, remove, or reorder steps.

$steps = apply_filters( 'freemkit_wizard_steps', $steps );
ParameterTypeDescription
$stepsarrayAssociative array of wizard step definitions

Audit Log

freemkit_audit_log_max_entries

Maximum number of entries to retain in the audit log.

$max = apply_filters( 'freemkit_audit_log_max_entries', 200 );

Kit OAuth: Token Refresh

freemkit_refresh_advance_seconds

How many seconds before a Kit token expires to schedule a proactive refresh.

$advance = apply_filters( 'freemkit_refresh_advance_seconds', $advance_secs, $ttl_secs );
ParameterTypeDescription
$advance_secsintSeconds before expiry to refresh
$ttl_secsintTotal token TTL in seconds

Was this article helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *