WSChat 3.1.9 has 23 actions and 42 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when WSChat fires an action
add_action( 'wschat_admin_settings_page_end', function() {
// Your code runs here.
}, 10, 1 );
// Change a value WSChat is about to use
add_filter( 'wschat_process_message_data_before_send', function( $data ) {
// Change $data here.
return $data;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Fire an action hook for admin settings page end */ do_action( 'wschat_admin_settings_page_end' ); -
/** * Fire an action hook on message send */ do_action( 'wschat_on_send_message', $message, $participant, $conversation ); -
/** * Fire a filter hook for processing message data before sending */ apply_filters( 'wschat_process_message_data_before_send', $data ); -
/** * Fire a action hook for help and support tab */ do_action( "req_settings_tab_{$active_tab}" ); -
/** * Fire a filter hook for settings default tab */ apply_filters( 'request_a_quote_settings_default_tab', 'faqs' ); -
/** * Fire a filter hook for settings tab */ apply_filters( 'settings_tabs', $setting_menus ); -
/** * Fire a action hook for ssi extra info */ do_action( 'ssi_extra_info' ); -
/** * Fire a filter hook for ssi view path output */ apply_filters( 'ssi_view_path_output', $path ); -
/** * Fire a filter hook for adding an agent as participant on new message */ apply_filters( 'wschat_add_agent_as_participant_on_new_message', true ); -
/** * Space to add admin notifications */ do_action( 'wschat_admin_settings_notices' ); -
/** * Fire an action hook after submitting pre-chat form */ do_action( 'wschat_after_submit_pre_chat_form', $conversation, $user ); -
/** * Fire a filter hook for agent capabilities */ apply_filters( 'wschat_agent_capabilities', $caps ); -
/** * Fire a filter hook for default online status of agent */ apply_filters( 'wschat_agent_default_online_status', 'online' ); -
/** * Fire an action hook when agent is been deassigned from the chat */ do_action( 'wschat_agent_is_designed_from_the_chat', $conversation_1, $participant, $participant_id ); -
/** * Fire a filter hook for agent online status */ apply_filters( 'wschat_agent_online_status', $status, $agent_id ); -
/** * Apply a filter to change agent mobile_no */ apply_filters( 'wschat_agent_phone_number', $agent_phone_number, $agent, $conversation ); -
/** * Apply a filter to get the meta key of a user */ apply_filters( 'wschat_agent_phone_number_meta_key', 'mobile_no' ); -
/** * Fire a filter hook for agent roles */ apply_filters( 'wschat_agent_roles', $roles ); -
/** * Fire a filter hook for alert tones */ apply_filters( 'wschat_alert_tones', $files ); -
/** * Fire an action hook before submitting pre-chat form */ do_action( 'wschat_before_submit_pre_chat_form', $rules, $data ); -
/** * Fire a filter hook to check new user can be created or not */ apply_filters( 'wschat_can_create_user', $create ); -
/** * Fire a filter hook to check whether to start the conversation or not */ apply_filters( 'wschat_can_start_a_conversation', true ); -
/** * Fire a filter hook after create a conversation */ apply_filters( 'wschat_conversation_after_create', $self ); -
/** * Fire a filter hook before create a conversaion */ apply_filters( 'wschat_conversation_before_create', $data ); -
/** * Fire a filter hook before saving a conversation */ apply_filters( 'wschat_conversation_before_save', $data, $this ); -
/** * Fire an action hook when session was ended */ do_action( 'wschat_conversation_session_ended', $conversation, $participant ); -
/** * Fire action on session start */ do_action( 'wschat_conversation_session_started', $conversation, $participant, $message ); -
/** * Fire an action hook to create new conversation */ do_action( 'wschat_create_new_conversation', $conversation, $user ); -
/** * Fire a filter hook for default tag colour */ apply_filters( 'wschat_default_tag_color', $settings->get( 'default_tag_color', '333333' ) ); -
/** * Fire a filter hook for dialog flow agent id */ apply_filters( 'wschat_dialog_flow_agent_id', $this->get_settings()->get_agent_id() ); -
/** * Fire a filter hook for dialog flow settings */ apply_filters( "wschat_dialog_flow_settings_{$key}", parent::get( $key, $default ) ); -
/** * Fire a filter hook for default settings of dialog flow */ apply_filters( 'wschat_dialog_flow_settings_data_defaults', $defaults ); -
/** * Fire a filter hook for dialog flow language codes */ apply_filters( 'wschat_dialogflow_language_codes', $language_codes ); -
/** * Fire a filter hook for feedback email subject */ apply_filters( 'wschat_feedback_email_subject', __( 'WSChat Feedback', 'wschat' ) ); -
/** * Fire an action hook for geo ip rate limit exceed */ do_action( 'wschat_geo_ip_rate_limit_exceed', wp_remote_retrieve_header( $response, 'x-ttl' ) ); -
/** * Fire a filter hook for settings */ apply_filters( 'wschat_get_settings', $settings ); -
/** * Fire an action hook for new chat user */ do_action( 'wschat_new_chat_user', $user ); -
/** * Fire a filter hook for new role capabilities */ apply_filters( 'wschat_new_role_capabilities', $capabilities ); -
/** * When an agent joins the conversation */ do_action( 'wschat_on_agent_join_conversation', array( 'conversation' => $conversation, 'participant' => $participant, ) ); -
/** * Fire an action hook for by whom the message is being send */ do_action( "wschat_on_send_message_{$participant->type}", $message, $participant, $conversation ); -
/** * Fire an action hook for starting conversation */ do_action( 'wschat_on_start_conversation', $conversation, $user ); -
/** * Fire an action when participant has declined the chat */ do_action( 'wschat_participant_has_declined_the_chat', $conversation, $participant ); -
/** * Fire an action hook when participant has joined the chat */ do_action( 'wschat_participant_has_joined_the_chat', $conversation, $participant ); -
/** * Fire a filter hook for removing widget powered by */ apply_filters( 'wschat_remove_widget_powered_by', false ); -
/** * Fire a filter hook for default settings tab */ apply_filters( 'wschat_settings_default_tab', 'general' ); -
/** * Apply a filter hook for integration settings default sub tab */ apply_filters( 'wschat_settings_integrations_default_subtab', 'dialogflow' ); -
/** * Fires after the settings has been saved */ do_action( 'wschat_settings_saved', $wschat_options ); -
/** * Fires after the settings has been saved with the current tab */ do_action( "wschat_settings_saved_{$this->get_current_tab()}", $wschat_options ); -
/** * Fires before the settings has been saved to update the settings object */ apply_filters( 'wschat_settings_saving', $wschat_options ); -
/** * Fires before the settings has been saved to update the settings object along * with the current tab suffix */ apply_filters( "wschat_settings_saving_{$this->get_current_tab()}", $wschat_options ); -
/** * Fire a filter hook for saving settings integration */ apply_filters( "wschat_settings_saving_integrations_{$subtab}", $settings ); -
/** * Fire a filter hook for settings tab */ do_action( 'wschat_settings_tab', $active_tab ); -
/** * Fire an action hook for settings tab */ do_action( "wschat_settings_tab_{$active_tab}" ); -
/** * Fire an action hook for settings tab integration */ do_action( "wschat_settings_tab_integrations_{$active_tab}" ); -
/** * Fire a filter hook for failed response on conversation start */ apply_filters( 'wschat_start_conversation_failed_response', $failed_response ); -
/** * Fire a filter hook for email transcript subject */ apply_filters( 'wschat_transcript_email_subject', __( 'WSChat email transcipt', 'wschat' ) ); -
/** * Fire a filter hook for user conversation */ apply_filters( 'wschat_user_conversation', $conversation ); -
/** * Apply a filter hook to get all the orders link */ apply_filters( 'wschat_wc_all_orders_link', $all_orders_link ); -
/** * Apply a filter hook to get all the statuses to consider as cancelled_orders */ apply_filters( 'wschat_wc_cancelled_statuses', array( 'wc-cancelled', 'wc-failed', 'wc-refunded' ) ); -
/** * Apply a filter hook to get all the statuses to consider as completed_orders */ apply_filters( 'wschat_wc_completed_statuses', array( 'wc-completed' ) ); -
/** * Fire a filter hook for whatsapp message body */ apply_filters( 'wschat_whatsapp_message_body', $body ); -
/** * Apply a filter to modify whatsapp message body */ apply_filters( "wschat_whatsapp_message_body_{$template}", $body, $message, $participant, $conversation ); -
/** * Fire a filter hook for widget fonts */ apply_filters( 'wschat_widget_fonts', array( 'sans-serif', 'monospace', 'fantasy', 'Roboto', 'cursive' ) );
Generated from WSChat's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: