Legend

ACTION68 hooks
FILTER27 hooks

Prefix

skunkcrm_

Hooks & Filters Reference

SkunkCRM provides WordPress action and filter hooks to extend and customize your CRM. All hooks use the skunkcrm_ prefix.

ACTION

Action Hooks

Actions let you execute custom code at specific points in SkunkCRM's execution flow.

add_action('skunkcrm_after_contact_create',
    'my_function', 10, 2);
FILTER

Filter Hooks

Filters let you modify data as it passes through SkunkCRM's processing.

add_filter('skunkcrm_contact_data_before_save',
    'my_function', 10, 2);
ACTIONskunkcrm_activity_created

Fires after an activity/note is created.

Parameters

ParameterTypeDescription
$activityobjectThe created activity object.
$dataarrayThe data used to create the activity.

Example

add_action('skunkcrm_activity_created', function($activity, $data) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_activity_deleted

Fires after an activity is deleted.

Parameters

ParameterTypeDescription
$activityobjectThe deleted activity object.

Example

add_action('skunkcrm_activity_deleted', function($activity) {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_emails_menu_badge

Filters the emails menu badge.

Example

add_filter('skunkcrm_emails_menu_badge', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/skunkcrm.php
FILTERskunkcrm_hidden_menu_pages

Filters the hidden menu pages.

Example

add_filter('skunkcrm_hidden_menu_pages', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/skunkcrm.php
FILTERskunkcrm_main_menu_badge

Filters the main menu badge.

Example

add_filter('skunkcrm_main_menu_badge', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/skunkcrm.php
FILTERskunkcrm_menu_items

Filter the CRM navigation menu items.

Parameters

ParameterTypeDescription
$menu_itemsarrayArray of menu items with label, href, and icon.
$has_proboolWhether Pro version is active.

Example

add_filter('skunkcrm_menu_items', function($menu_items, $has_pro) {
    // Modify and return $menu_items
    return $menu_items;
}, 10, 2);
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_submenu_highlight_map

Filters the submenu highlight map.

Example

add_filter('skunkcrm_submenu_highlight_map', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_after_contact_archive

Fires after a contact is successfully archived.

Parameters

ParameterTypeDescription
$idintContact ID that was archived
$contactarrayContact data

Example

add_action('skunkcrm_after_contact_archive', function($id, $contact) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_after_contact_unarchive

Fires after a contact is successfully unarchived.

Parameters

ParameterTypeDescription
$idintContact ID that was unarchived

Example

add_action('skunkcrm_after_contact_unarchive', function($id) {
    // Your code here
});
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contact_archive

Fires before a contact is archived.

Parameters

ParameterTypeDescription
$idintContact ID being archived
$contactarrayContact data

Example

add_action('skunkcrm_before_contact_archive', function($id, $contact) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contact_unarchive

Fires before a contact is unarchived.

Parameters

ParameterTypeDescription
$idintContact ID being unarchived

Example

add_action('skunkcrm_before_contact_unarchive', function($id) {
    // Your code here
});
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_after_contact_assignment_change

Fires after a contact's assignment is successfully changed.

Parameters

ParameterTypeDescription
$idintContact ID
$old_assigned_tointPrevious assignee user ID
$new_assigned_tointNew assignee user ID

Example

add_action('skunkcrm_after_contact_assignment_change', function($id, $old_assigned_to, $new_assigned_to) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contact_assignment_change

Fires before a contact's assignment is changed.

Parameters

ParameterTypeDescription
$idintContact ID
$old_assigned_tointPrevious assignee user ID
$new_assigned_tointNew assignee user ID

Example

add_action('skunkcrm_before_contact_assignment_change', function($id, $old_assigned_to, $new_assigned_to) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_after_contact_create

Fires after a contact is successfully created.

Parameters

ParameterTypeDescription
$contact_idintNewly created contact ID
$dataarrayContact data that was saved

Example

add_action('skunkcrm_after_contact_create', function($contact_id, $data) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_after_contact_delete

Fires after a contact is successfully deleted.

Parameters

ParameterTypeDescription
$idintContact ID that was deleted
$contactarrayContact data that was deleted

Example

add_action('skunkcrm_after_contact_delete', function($id, $contact) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_after_contact_update

Fires after a contact is successfully updated.

Parameters

ParameterTypeDescription
$idintContact ID that was updated
$dataarrayContact data that was saved
$existing_contactarrayPrevious contact data

Example

add_action('skunkcrm_after_contact_update', function($id, $data, $existing_contact) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contact_create

Fires before a contact is created.

Parameters

ParameterTypeDescription
$dataarrayContact data being created

Example

add_action('skunkcrm_before_contact_create', function($data) {
    // Your code here
});
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contact_delete

Fires before a contact is deleted.

Parameters

ParameterTypeDescription
$idintContact ID being deleted
$contactarrayContact data being deleted

Example

add_action('skunkcrm_before_contact_delete', function($id, $contact) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contact_update

Fires before a contact is updated.

Parameters

ParameterTypeDescription
$idintContact ID being updated
$dataarrayNew contact data
$existing_contactarrayExisting contact data

Example

add_action('skunkcrm_before_contact_update', function($id, $data, $existing_contact) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_after_contacts_retrieve

Fires after contacts have been retrieved from the database.

Parameters

ParameterTypeDescription
$resultsarrayRetrieved contact records
$argsarrayQuery arguments used

Example

add_action('skunkcrm_after_contacts_retrieve', function($results, $args) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contacts_retrieve

Fires before contacts are retrieved from the database.

Parameters

ParameterTypeDescription
$argsarrayQuery arguments being used

Example

add_action('skunkcrm_before_contacts_retrieve', function($args) {
    // Your code here
});
Source: skunkcrm/includes/class-contacts.php
FILTERskunkcrm_contact_data_before_save

Filters contact data before saving to database during creation.

Parameters

ParameterTypeDescription
$dataarrayContact data to be saved
$contact_idint|nullContact ID (null for new contacts)

Example

add_filter('skunkcrm_contact_data_before_save', function($data, $contact_id) {
    // Modify and return $data
    return $data;
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
FILTERskunkcrm_contact_data_retrieved

Filters contact data when retrieved by ID.

Parameters

ParameterTypeDescription
$contactarrayContact data
$idintContact ID

Example

add_filter('skunkcrm_contact_data_retrieved', function($contact, $id) {
    // Modify and return $contact
    return $contact;
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
FILTERskunkcrm_contacts_query_args

Filters the query arguments before retrieving contacts.

Parameters

ParameterTypeDescription
$argsarrayQuery arguments

Example

add_filter('skunkcrm_contacts_query_args', function($args) {
    // Modify and return $args
    return $args;
});
Source: skunkcrm/includes/class-contacts.php
FILTERskunkcrm_contacts_route_config

Filter the contacts endpoint route configuration.

Parameters

ParameterTypeDescription
$contacts_route_configarrayThe route configuration for contacts endpoints.

Example

add_filter('skunkcrm_contacts_route_config', function($contacts_route_config) {
    // Modify and return $contacts_route_config
    return $contacts_route_config;
});
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_contacts_search_results

Filters the contacts search results before returning.

Parameters

ParameterTypeDescription
$resultsarrayArray of contact records
$argsarrayQuery arguments used

Example

add_filter('skunkcrm_contacts_search_results', function($results, $args) {
    // Modify and return $results
    return $results;
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
FILTERskunkcrm_get_contacts_params

Filter get contacts request parameters.

Parameters

ParameterTypeDescription
$paramsarrayRequest parameters.
$requestWP_REST_RequestRequest object.

Example

add_filter('skunkcrm_get_contacts_params', function($params, $request) {
    // Modify and return $params
    return $params;
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_contact_status_change

Fires after a contact's status is successfully changed.

Parameters

ParameterTypeDescription
$idintContact ID
$old_statusstringPrevious status
$new_statusstringNew status

Example

add_action('skunkcrm_after_contact_status_change', function($id, $old_status, $new_status) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_before_contact_status_change

Fires before a contact's status is changed.

Parameters

ParameterTypeDescription
$idintContact ID
$old_statusstringPrevious status
$new_statusstringNew status

Example

add_action('skunkcrm_before_contact_status_change', function($id, $old_status, $new_status) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-contacts.php
FILTERskunkcrm_contact_status_options

Filters the contact status options.

Example

add_filter('skunkcrm_contact_status_options', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_deal_created

Fires after a deal is created.

Parameters

ParameterTypeDescription
$dealobjectThe created deal object.
$dataarrayThe data used to create the deal.

Example

add_action('skunkcrm_deal_created', function($deal, $data) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_deal_updated

Fires after a deal is updated.

Parameters

ParameterTypeDescription
$updated_dealobjectThe updated deal object.
$existing_dealobjectThe deal data before update.
$dataarrayThe data that was updated.

Example

add_action('skunkcrm_deal_updated', function($updated_deal, $existing_deal, $data) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_column_addition

Fires after adding deal_id column to activities table

Parameters

ParameterTypeDescription
$activities_tablestringThe activities table name
$column_namestringThe column that was added

Example

add_action('skunkcrm_after_column_addition', function($activities_table, $column_name) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_after_contact_retrieve_by_id

Fires after a contact is retrieved by ID.

Parameters

ParameterTypeDescription
$contactarray|nullContact data or null if not found
$idintContact ID that was retrieved

Example

add_action('skunkcrm_after_contact_retrieve_by_id', function($contact, $id) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_after_create_contact

Fires after successfully creating a contact.

Parameters

ParameterTypeDescription
$contactarrayCreated contact data.
$requestWP_REST_RequestRequest object.

Example

add_action('skunkcrm_after_create_contact', function($contact, $request) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_database_check

Fires after database check.

Example

add_action('skunkcrm_after_database_check', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_after_database_setup

Fires after database setup.

Example

add_action('skunkcrm_after_database_setup', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_after_delete_contact

Fires after successfully deleting a contact.

Parameters

ParameterTypeDescription
$contactarrayDeleted contact data.
$requestWP_REST_RequestRequest object.

Example

add_action('skunkcrm_after_delete_contact', function($contact, $request) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_includes_loaded

Fires after includes loaded.

Example

add_action('skunkcrm_after_includes_loaded', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_after_schema_update

Fires after database schema updates complete

Parameters

ParameterTypeDescription
$activities_tablestringThe activities table name

Example

add_action('skunkcrm_after_schema_update', function($activities_table) {
    // Your code here
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_after_table_drop

Fires after each individual table is dropped

Parameters

ParameterTypeDescription
$tablestringThe table name that was dropped

Example

add_action('skunkcrm_after_table_drop', function($table) {
    // Your code here
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_after_table_recreation

Fires after all tables have been recreated

Parameters

ParameterTypeDescription
$tablesarrayArray of table names that were recreated

Example

add_action('skunkcrm_after_table_recreation', function($tables) {
    // Your code here
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_after_tables_dropped

Fires after all tables are dropped but before recreation

Parameters

ParameterTypeDescription
$tablesarrayArray of table names that were dropped

Example

add_action('skunkcrm_after_tables_dropped', function($tables) {
    // Your code here
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_after_update_contact

Fires after successfully updating a contact.

Parameters

ParameterTypeDescription
$contactarrayUpdated contact data.
$requestWP_REST_RequestRequest object.

Example

add_action('skunkcrm_after_update_contact', function($contact, $request) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_column_addition

Fires before adding deal_id column to activities table

Parameters

ParameterTypeDescription
$activities_tablestringThe activities table name
$columnsarrayCurrent table columns

Example

add_action('skunkcrm_before_column_addition', function($activities_table, $columns) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_before_contact_retrieve_by_id

Fires before a contact is retrieved by ID.

Parameters

ParameterTypeDescription
$idintContact ID being retrieved

Example

add_action('skunkcrm_before_contact_retrieve_by_id', function($id) {
    // Your code here
});
Source: skunkcrm/includes/class-contacts.php
FILTERskunkcrm_before_create_contact

Filter contact data before creating.

Parameters

ParameterTypeDescription
$dataarrayContact data to create.
$requestWP_REST_RequestRequest object.

Example

add_filter('skunkcrm_before_create_contact', function($data, $request) {
    // Modify and return $data
    return $data;
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_delete_contact

Fires before deleting a contact.

Parameters

ParameterTypeDescription
$contactarrayContact data being deleted.
$requestWP_REST_RequestRequest object.

Example

add_action('skunkcrm_before_delete_contact', function($contact, $request) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_schema_update

Fires before database schema updates begin

Parameters

ParameterTypeDescription
$activities_tablestringThe activities table name

Example

add_action('skunkcrm_before_schema_update', function($activities_table) {
    // Your code here
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_before_table_drop

Fires before each individual table is dropped

Parameters

ParameterTypeDescription
$tablestringThe table name being dropped

Example

add_action('skunkcrm_before_table_drop', function($table) {
    // Your code here
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_before_table_recreation

Fires before tables are dropped for recreation

Parameters

ParameterTypeDescription
$tablesarrayArray of table names to be dropped

Example

add_action('skunkcrm_before_table_recreation', function($tables) {
    // Your code here
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_calendar_content

Fires calendar content.

Example

add_action('skunkcrm_calendar_content', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_contact_auto_assigned

Fires contact auto assigned.

Example

add_action('skunkcrm_contact_auto_assigned', function() {
    // Your code here
});
Source: skunkcrm-pro/includes/class-assignment-rules.php
FILTERskunkcrm_contact_validation_rules

Filters contact validation rules before creation.

Parameters

ParameterTypeDescription
$validation_rulesarrayArray of validation rules
$dataarrayContact data being validated

Example

add_filter('skunkcrm_contact_validation_rules', function($validation_rules, $data) {
    // Modify and return $validation_rules
    return $validation_rules;
}, 10, 2);
Source: skunkcrm/includes/class-contacts.php
ACTIONskunkcrm_email_received

Fires email received.

Example

add_action('skunkcrm_email_received', function() {
    // Your code here
});
Source: skunkcrm-pro/includes/email/class-email-database.php
ACTIONskunkcrm_enqueue_pro_spa_scripts

Fires enqueue pro spa scripts.

Example

add_action('skunkcrm_enqueue_pro_spa_scripts', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
FILTERskunkcrm_import_deals

Action hook for pro plugin to handle deals import

Example

add_filter('skunkcrm_import_deals', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/includes/class-csv-import-export.php
FILTERskunkcrm_import_team

Action hook for pro plugin to handle team import

Example

add_filter('skunkcrm_import_team', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/includes/class-csv-import-export.php
FILTERskunkcrm_import_types

Filters the import types.

Example

add_filter('skunkcrm_import_types', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/includes/class-csv-import-export.php
FILTERskunkcrm_individual_contact_route_config

Filter the individual contact endpoint route configuration.

Parameters

ParameterTypeDescription
$individual_contact_configarrayThe route configuration for individual contact endpoints.

Example

add_filter('skunkcrm_individual_contact_route_config', function($individual_contact_config) {
    // Modify and return $individual_contact_config
    return $individual_contact_config;
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_legacy_table_dropped

Fires legacy table dropped.

Example

add_action('skunkcrm_legacy_table_dropped', function() {
    // Your code here
});
Source: skunkcrm/includes/class-unified-database.php
FILTERskunkcrm_recreate_tables_list

Filter the list of tables to be recreated

Parameters

ParameterTypeDescription
$tablesarrayArray of table names to be dropped and recreated

Example

add_filter('skunkcrm_recreate_tables_list', function($tables) {
    // Modify and return $tables
    return $tables;
});
Source: skunkcrm/includes/class-database.php
ACTIONskunkcrm_table_created

Fires table created.

Example

add_action('skunkcrm_table_created', function() {
    // Your code here
});
Source: skunkcrm/includes/class-unified-database.php
ACTIONskunkcrm_tour_completed

Fires when user completes or skips the product tour.

Parameters

ParameterTypeDescription
$user_idintUser ID.
$statusstringTour status ('completed' or 'skipped').

Example

add_action('skunkcrm_tour_completed', function($user_id, $status) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_tour_reset

Fires when user resets the product tour.

Parameters

ParameterTypeDescription
$user_idintUser ID.

Example

add_action('skunkcrm_tour_reset', function($user_id) {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_admin_permission_check

Filter admin API permissions check result.

Parameters

ParameterTypeDescription
$has_admin_permissionboolWhether user has admin permission.

Example

add_filter('skunkcrm_admin_permission_check', function($has_admin_permission) {
    // Modify and return $has_admin_permission
    return $has_admin_permission;
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_admin_permission_check

Fires after checking admin API permissions.

Parameters

ParameterTypeDescription
$has_admin_permissionboolWhether user has admin permission.

Example

add_action('skunkcrm_after_admin_permission_check', function($has_admin_permission) {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_permission_check

Fires after checking basic API permissions.

Parameters

ParameterTypeDescription
$has_permissionboolWhether user has permission.

Example

add_action('skunkcrm_after_permission_check', function($has_permission) {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_team_permission_check

Fires after checking team API permissions.

Parameters

ParameterTypeDescription
$has_team_permissionboolWhether user has team permission.

Example

add_action('skunkcrm_after_team_permission_check', function($has_team_permission) {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_admin_permission_check

Fires before checking admin API permissions.

Example

add_action('skunkcrm_before_admin_permission_check', function() {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_permission_check

Fires before checking basic API permissions.

Example

add_action('skunkcrm_before_permission_check', function() {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_team_permission_check

Fires before checking team API permissions.

Example

add_action('skunkcrm_before_team_permission_check', function() {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_team_permission_check

Filter team API permissions check result.

Parameters

ParameterTypeDescription
$has_team_permissionboolWhether user has team permission.

Example

add_filter('skunkcrm_team_permission_check', function($has_team_permission) {
    // Modify and return $has_team_permission
    return $has_team_permission;
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_activation

Fires after activation.

Example

add_action('skunkcrm_after_activation', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_after_api_init

Fires after SkunkCRM REST API routes are registered.

Parameters

ParameterTypeDescription
$api_instanceSkunkCRM_APIThe API instance.

Example

add_action('skunkcrm_after_api_init', function($api_instance) {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_deactivation

Fires after deactivation.

Example

add_action('skunkcrm_after_deactivation', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_after_init

Fires after init.

Example

add_action('skunkcrm_after_init', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_after_user_roles_init

Fires after user roles init.

Example

add_action('skunkcrm_after_user_roles_init', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_before_api_init

Fires before SkunkCRM REST API routes are registered.

Parameters

ParameterTypeDescription
$api_instanceSkunkCRM_APIThe API instance.

Example

add_action('skunkcrm_before_api_init', function($api_instance) {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_deactivation

Fires before deactivation.

Example

add_action('skunkcrm_before_deactivation', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
ACTIONskunkcrm_before_init

Fires before init.

Example

add_action('skunkcrm_before_init', function() {
    // Your code here
});
Source: skunkcrm/skunkcrm.php
FILTERskunkcrm_apply_rate_limiting

Filters the apply rate limiting.

Example

add_filter('skunkcrm_apply_rate_limiting', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_after_api_request

Fires after processing create contact API request successfully.

Parameters

ParameterTypeDescription
$responseWP_REST_ResponseResponse object.
$requestWP_REST_RequestRequest object.
$endpointstringCurrent endpoint name.

Example

add_action('skunkcrm_after_api_request', function($response, $request, $endpoint) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_api_error

Fires when create contact API request encounters an error.

Parameters

ParameterTypeDescription
$errorWP_ErrorError object.
$requestWP_REST_RequestRequest object.
$endpointstringCurrent endpoint name.

Example

add_action('skunkcrm_api_error', function($error, $request, $endpoint) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_api_error_response

Filter API error before returning.

Parameters

ParameterTypeDescription
$errorWP_ErrorError object.
$exceptionExceptionOriginal exception.
$requestWP_REST_RequestRequest object.
$endpointstringCurrent endpoint name.

Example

add_filter('skunkcrm_api_error_response', function($error, $exception, $request, $endpoint) {
    // Modify and return $error
    return $error;
}, 10, 4);
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_api_permission_check

Filter basic API permissions check result.

Parameters

ParameterTypeDescription
$has_permissionboolWhether user has permission.

Example

add_filter('skunkcrm_api_permission_check', function($has_permission) {
    // Modify and return $has_permission
    return $has_permission;
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_api_rate_limited

Fires when API request is rate limited.

Parameters

ParameterTypeDescription
$endpointstringCurrent endpoint name.
$current_requestsintNumber of current requests.
$rate_configarrayRate limit configuration.

Example

add_action('skunkcrm_api_rate_limited', function($endpoint, $current_requests, $rate_config) {
    // Your code here
}, 10, 3);
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_api_rate_limits

Filters the api rate limits.

Example

add_filter('skunkcrm_api_rate_limits', function() {
    // Modify and return $value
    return $value;
});
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_api_response

Filter create contact response before sending.

Parameters

ParameterTypeDescription
$responseWP_REST_ResponseResponse object.
$requestWP_REST_RequestRequest object.
$endpointstringCurrent endpoint name.

Example

add_filter('skunkcrm_api_response', function($response, $request, $endpoint) {
    // Modify and return $response
    return $response;
}, 10, 3);
Source: skunkcrm/includes/class-api.php
FILTERskunkcrm_api_response_data

Filter delete contact response data before creating response.

Parameters

ParameterTypeDescription
$response_dataarrayResponse data.
$requestWP_REST_RequestRequest object.
$endpointstringCurrent endpoint name.

Example

add_filter('skunkcrm_api_response_data', function($response_data, $request, $endpoint) {
    // Modify and return $response_data
    return $response_data;
}, 10, 3);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_api_request

Fires before processing create contact API request.

Parameters

ParameterTypeDescription
$requestWP_REST_RequestRequest object.
$endpointstringCurrent endpoint name.

Example

add_action('skunkcrm_before_api_request', function($request, $endpoint) {
    // Your code here
}, 10, 2);
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_before_task_delete

Fires before task delete.

Example

add_action('skunkcrm_before_task_delete', function() {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_task_completed

Fires task completed.

Example

add_action('skunkcrm_task_completed', function() {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_task_created

Fires task created.

Example

add_action('skunkcrm_task_created', function() {
    // Your code here
});
Source: skunkcrm/includes/class-api.php
ACTIONskunkcrm_task_updated

Fires task updated.

Example

add_action('skunkcrm_task_updated', function() {
    // Your code here
});
Source: skunkcrm/includes/class-api.php

Documentation auto-generated from plugin source code. Last updated: 1/23/2026