Developer Hooks Reference

DeskPress provides a comprehensive set of WordPress filter and action hooks that let you customize and extend the plugin's behavior. This reference covers all public hooks organized by feature area.

Support Form Hooks

Form Template Actions

These action hooks fire at specific points inside the support form HTML, letting you inject custom content.

Hook Description
hsd_form_start Fires at the beginning of the form, inside the
tag.
hsd_form_subject Fires before the subject field.
hsd_form_message Fires before the message textarea.
hsd_form_attachments Fires before the attachments field.
hsd_form_hidden_values Fires in the hidden fields area. Use this to add custom hidden inputs.
hsd_form_submit Fires before the submit button.
hsd_form_end Fires at the end of the form, before the closing tag.
hsd_email_form_fields Fires inside the email identification form to add custom fields.

Form Submission Actions

Hook Description
hsd_submission_form Fires at the start of form submission processing, after nonce verification.
hsd_form_submitted_without_error Fires after a form is successfully submitted. Receives $success (bool).
hsd_form_submitted_with_error Fires when a form submission fails. Receives $success (bool).
hsd_form_submitted_to_create_thread Fires just before a reply is created from form data.
hsd_form_submitted_to_create_conversation Fires just before a new conversation is created from form data.

Form Submission Filters

Hook Parameters Description
hsd_allowed_attachment_mime_types $mime_types (array) Filters the array of allowed MIME types for file attachments.
hsd_max_attachment_size $max_size (int) Filters the maximum file size for attachments in bytes. Default: 5 MB.
hsd_thread_submitted_success_redirect_url $redirect_url (string) Filters the redirect URL after a successful form submission.
hsd_thread_submitted_error_redirect_url $redirect_url (string) Filters the redirect URL after a failed form submission.
hsd_process_form_submission_new_thread $new_thread (mixed) Filters the result of form submission processing before return.

Conversation Hooks

Conversation Filters

Hook Parameters Description
hsd_hide_drafts_and_notes $hide (bool) Controls whether draft and note threads are hidden from front-end display. Default: true.
hsd_get_complete_conversation $conversation (array), $conversation_id (string), $refresh (bool) Filters a complete conversation array (conversation + customer + threads) before it is returned.
hsd_check_customer_id_for_security $check (bool) Controls whether the customer ID security check is enforced when listing conversations. Default: true.
hsd_get_full_conversations_by_user $conversations (array), $customer_id (string), $refresh (bool) Filters the full array of conversations for a user before it is returned.
hsd_pagination_per_page $per_page (int) Filters the number of conversations shown per page in the conversation table. Default: 10.

Creating Conversations and Threads

Hook Type Parameters Description
hsd_create_thread_fields Filter $fields (array: customer, text, attachments, status) Filters the fields array sent to the API when creating a new thread (reply).
hsd_create_conversation_fields Filter $fields (array: mailboxId, customer, type, status, subject, threads) Filters the fields array sent to the API when creating a new conversation.
hsd_create_thread Action $raw_response (array) Fires after a new thread (reply) is successfully created.
hsd_create_conversation Action $raw_response (array) Fires after a new conversation is successfully created.

Single Conversation View Hooks

These action hooks fire at specific points in the single conversation template. All hooks receive $item (array) — the conversation array.

Hook Description
hsd_single_conversation_go_back Fires after the "back to conversations" link.
hsd_single_conversation_pre_title Fires before the conversation title in the header.
hsd_single_conversation_post_title Fires after the conversation title in the header.
hsd_single_conversation_pre_posted_on Fires before the posted-on metadata (author, date, thread count).
hsd_single_conversation_posted_on Fires after the posted-on metadata items.
hsd_single_conversation_post_header Fires after the entire conversation header.
hsd_single_conversation_thread_start Fires before the thread messages loop begins.
hsd_single_conversation_thread_end Fires after the thread messages loop ends.

Support Portal Hooks

Portal Template Actions

These action hooks fire at key layout points in the portal templates.

Hook Description
hsd_portal_after_hero Fires after the hero/header section of the portal.
hsd_portal_after_topics Fires after the topic/category cards section.
hsd_portal_before_conversations Fires before the conversations table section.
hsd_portal_after_conversations Fires after the conversations table section.
hsd_portal_after_actions Fires after the action buttons section.

Portal Filters

Hook Parameters Description
hsd_portal_footer_text $text (string) Filters the footer text displayed at the bottom of the portal. Default: "Powered by DeskPress".

Customer Hooks

Hook Type Parameters Description
hsd_find_customer_ids_pre Filter $customer_ids (array), $user_id (int), $refresh (bool) Filters the customer IDs array before the API lookup runs. Return a non-empty array to skip the API call.
hsd_find_customer_ids Filter $customer_ids (array), $user_id (int), $refresh (bool) Filters the final customer IDs array after lookup.
hsd_is_customer Filter $is_customer (bool) Filters whether the current visitor is considered a Help Scout customer. Default: is_user_logged_in().
hsd_api_find_email Filter $user_email (string), $user_id (int) Filters the email address used to look up a customer in Help Scout.
hsd_get_user_customer_ids Filter $customer_ids (array), $user_id (int) Filters customer IDs retrieved from user meta.
hsd_set_user_customer_ids Action $user_id (int), $customer_ids (array) Fires after customer IDs are saved to user meta.

API Request Hooks

These filters let you modify Help Scout API requests and responses.

GET Requests

Hook Parameters Description
hsd_v2_api_request_api_url $api_url (string), $endpoint (string), $query (array), $refresh (bool) Filters the API URL before a GET request is made.
hsd_v2_api_request_params $params (array), $endpoint (string), $api_url (string), $query (array), $refresh (bool) Filters the wp_remote_request parameters for GET requests (headers, timeout, etc.).
hsd_v2_api_request $response (string), $endpoint (string), $api_url (string), $query (array), $refresh (bool) Filters the raw response body after a GET API request.

POST/PUT Requests

Hook Parameters Description
hsd_v2_api_post_api_url $api_url (string), $data (array), $method (string) Filters the API URL before a POST/PUT request is made.
hsd_v2_api_post_params $params (array), $api_url (string), $data (array) Filters the request parameters for POST/PUT requests.
hsd_v2_api_post $response (string), $api_url (string), $data (array), $method (string) Filters the raw response body after a POST/PUT API request.

Docs & Knowledge Base Hooks

Hook Type Parameters Description
hsd_docs_categories Filter $categories (array) — each item has title, icon, url, color Filters the default documentation topic categories displayed on the portal.

Tags Hooks

Hook Type Parameters Description
hsd_v2_get_converstation_tags Filter $convo_tags (array), $conversation (array), $tags (array of allowed tag IDs) Filters the conversation tags before display.

Email Login Hooks

Hook Type Parameters Description
hsd_maybe_store_customer_email Action Fires after a customer email is stored for identification.
hsd_process_email_form_submission Action Fires at the start of email form submission processing.
hsd_email_submitted_redirect_url Filter $redirect_url (string) Filters the redirect URL after an email identification form is submitted.

E-Commerce Sidebar App Hooks

Customer Profile

Hook Type Parameters Description
hsd_customer_profile_html Filter $html (string), $data (array), $emails (array), $wp_user (WP_User or false) Filters the customer profile HTML that appears in all e-commerce sidebar apps.

WooCommerce

Hook Type Parameters Description
hsd_woo_app_no_purchases_html Filter $html (string), $handler (object) Filters the HTML shown when no WooCommerce purchases are found.
hsd_woo_build_response_html_edit_url Filter $edit_url (string) Filters the edit URL for each WooCommerce order in the sidebar app.
hsd_woo_build_response_html Filter $html (string), $handler (object) Filters the complete HTML response for the WooCommerce sidebar app.

Easy Digital Downloads

Hook Type Parameters Description
hsd_edd_app_no_purchases_html Filter $html (string), $handler (object) Filters the HTML shown when no EDD purchases are found.
hsd_edd_app_early_html Filter $html (string), $handler (object), $orders (array), $downloads (array) Filters HTML prepended at the start of the EDD sidebar app response.
hsd_edd_support_topics Filter $map (array) — slug to label mapping Filters the EDD support topic choices.

WP eCommerce

Hook Type Parameters Description
hsd_wpsc_app_no_purchases_html Filter $html (string), $handler (object) Filters the HTML shown when no WP eCommerce purchases are found.
hsd_wpsc_app_early_html Filter $html (string), $handler (object), $orders (array) Filters HTML prepended at the start of the WP eCommerce sidebar app response.

Template & Localization Hooks

Hook Type Parameters Description
hsd_template_path Filter $template_path (string) Filters the template directory path used for view loading. Useful for template overrides in themes.
hsd_languages_directory Filter $lang_dir (string) Filters the languages directory used for loading translation files.
hsd_scripts_localization Filter $hsd_js_object (array) Filters the JavaScript localization object passed to front-end and admin scripts.

Display Helper Hooks

Hook Type Parameters Description
hsd_get_waiting_since Filter $waiting (string) Filters the human-readable "waiting since" string for a conversation.
hsd_get_days_ago Filter $days_since (int) Filters the calculated number of days since a conversation was last updated.

AJAX Hooks

Hook Type Parameters Description
hsd_allowed_ajax_methods Filter $allowed_methods (array) Filters the list of allowed AJAX method names that can be called via the shortcodes AJAX handler.

Onboarding Wizard Hooks

Hook Type Parameters Description
deskpress_onboarding_steps Filter $steps (array) — associative array keyed by step ID Filters the onboarding wizard steps array. Allows adding, removing, or reordering setup wizard steps.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us