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.
| Parameter | Type | Description |
|---|---|---|
$result | array | Token response from the Kit API |
$client_id | string | Kit OAuth client ID |
freemkit_api_refresh_token
Fires after a Kit access token is successfully refreshed.
| Parameter | Type | Description |
|---|---|---|
$result | array | New token response |
$client_id | string | Kit OAuth client ID |
$prev_access_token | string | The access token that was replaced |
$prev_refresh_token | string | The refresh token that was replaced |
freemkit_api_get_access_token_error
Fires when obtaining a Kit access token fails.
| Parameter | Type | Description |
|---|---|---|
$error | WP_Error | The error returned |
$client_id | string | Kit OAuth client ID |
freemkit_api_refresh_token_error
Fires when refreshing a Kit access token fails.
| Parameter | Type | Description |
|---|---|---|
$error | WP_Error | The error returned |
$client_id | string | Kit 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.
| Parameter | Type | Description |
|---|---|---|
$event_key | string | Unique 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.
| Parameter | Type | Description |
|---|---|---|
$id | int | New subscriber ID |
$subscriber | Subscriber | The subscriber object |
freemkit_after_update_subscriber
Fires after an existing subscriber record is updated.
| Parameter | Type | Description |
|---|---|---|
$id | int | Subscriber ID |
$subscriber | Subscriber | The updated subscriber object |
$existing | Subscriber | The subscriber object before the update |
freemkit_delete_subscriber
Fires when a subscriber is deleted from the local database.
| Parameter | Type | Description |
|---|---|---|
$id | int | The ID of the deleted subscriber |
$subscriber | Subscriber | The 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.
freemkit_settings_form_buttons
Fires inside the settings form button area. Use to add custom buttons to the settings page.
| Parameter | Type | Description |
|---|---|---|
$tab_id | string | Current tab slug |
$tab_name | string | Current tab display name |
$sections | array | Settings sections on the current tab |
freemkit_wizard_completed
Fires when the setup wizard is completed or skipped.
| Parameter | Type | Description |
|---|---|---|
$prefix | string | Plugin prefix (freemkit) |
freemkit_wizard_step_processed
Fires after each wizard step is saved.
| Parameter | Type | Description |
|---|---|---|
$step | int | The step number that was saved |
$settings | array | The settings values saved in this step |
Filters
Settings: Reading
freemkit_get_settings
Filters the entire settings array.
freemkit_get_option
Filters the value of any single option.
| Parameter | Type | Description |
|---|---|---|
$value | mixed | The option value |
$key | string | The option key |
$default | mixed | The default value |
freemkit_get_option_{$key}
Filters the value of a specific option. Replace {$key} with the option key.
freemkit_settings_defaults
Filters the default values for all settings.
Settings: Writing
freemkit_update_option
Filters an option value before it is saved.
Settings: Registration
freemkit_registered_settings
Filters the complete registered settings definition array (used to build the settings form).
freemkit_settings_sections
Filters the list of settings tabs/sections.
freemkit_settings_kit
Filters the settings fields on the Kit tab.
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).
freemkit_settings_subscribers
Filters the settings fields on the Subscribers tab.
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
$require | bool | false | Whether to reject requests with no timestamp |
$request | WP_REST_Request|null | Not applicable | The incoming request object |
freemkit_webhook_max_age
Maximum age in seconds for an incoming webhook event.
| Parameter | Type | Default | Description |
|---|---|---|---|
$max_age | int | 900 | Maximum allowed age in seconds |
$timestamp | int | Not applicable | The 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
$ttl | int | 86400 | Dedup window in seconds (minimum enforced: 1 hour) |
$event_key | string | Not applicable | The 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
$max | int | 3 | Maximum retries after the initial attempt |
$event_key | string | Not applicable | The 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
$defaults | array | ['user.marketing.opted_in'] | Default free event types |
$plugin_config | array | Not applicable | The plugin configuration array |
freemkit_default_paid_event_types
Filters the default event types that identify a paid user.
Default: ['license.created'].
freemkit_freemius_events
Filters the full list of available Freemius event types shown in autocomplete fields.
Wizard
freemkit_wizard_steps
Filters the array of setup wizard steps. Use to add, remove, or reorder steps.
| Parameter | Type | Description |
|---|---|---|
$steps | array | Associative array of wizard step definitions |
Audit Log
freemkit_audit_log_max_entries
Maximum number of entries to retain in the audit log.
Kit OAuth: Token Refresh
freemkit_refresh_advance_seconds
How many seconds before a Kit token expires to schedule a proactive refresh.
| Parameter | Type | Description |
|---|---|---|
$advance_secs | int | Seconds before expiry to refresh |
$ttl_secs | int | Total token TTL in seconds |
