Action hooks reference

HelpWP fires WordPress action hooks at every important moment in a doc’s or ticket’s life. Hook into them to add Slack notifications, log to your own table, sync to a CRM, or anything else.

Tickets

HookArgsFired when
helpwp-tickets-ticket_created$ticketA new ticket is created (front-end form or REST POST).
helpwp-tickets-client_commented$ticketA client posts a comment on a ticket.
helpwp-tickets-agent_commented$ticketAn agent posts a comment on a ticket.
helpwp-tickets-ticket_status_changed$new, $old, $ticketA ticket’s status changes (and both statuses are valid).
helpwp-tickets-ticket_status_{new}_to_{old}$ticketSame event, dynamic name. Useful for very specific filters.
helpwp-tickets-agent_changed$new_agent_id, $old_agent_idThe assigned agent of a ticket changes.
helpwp_tickets_comment_added$comment_id, $ticket_idAny comment was added (low-level, fires before the role-specific hooks).
helpwp-tickets-ticket_model_status_changed(no args)Internal, fires inside the Ticket model right after a status set.

Auth and users

HookArgsFired when
helpwp-tickets-code_generated$email, $codeA login verification code is generated. Used by the email controller to send the code.
helpwp-tickets-user_found$dataAn existing user was matched during the login flow.
helpwp-logged_in$user_idA user just signed in via the helpwplogin flow.
helpwp_user_inserted$user_idA brand-new HelpWP user was created during login.

Docs

HookArgsFired when
helpwp-doc_created$docA doc is created via REST.
helpwp-after_doc_content$docInside the single-doc template, after the post body. Use this to inject a “was this helpful?” widget, related-articles block, etc.

AI

HookArgsFired when
helpwp_ai_auto_respond$ticket_idThe auto-responder cron job. Single argument: the ticket ID. Use this if you want to replace the bot reply behavior end-to-end.

A practical example

Send a Slack message every time a Severe urgency ticket lands:

add_action( 'helpwp-tickets-ticket_created', function( $ticket ) {
    if ( 'severe' !== $ticket->get_urgency() ) return;
    wp_remote_post( 'https://hooks.slack.com/...', [
        'body' => json_encode( [
            'text' => sprintf( 'New severe ticket: %s', $ticket->get_title() ),
        ] ),
    ] );
} );

Was this doc helpful?

Scroll to Top