do_action( 'wpas_ticket_before_close_by_agent', $post_id );
This action hook gets fired before a ticket is closed by the agent – as long as the agent also provides a reply at the same time as they are closing the ticket.
function wpas_my_ticket_before_close_by_agent( $ticket_id ) { // log the ticket being closed... error_log( 'closing ticket: ' . (string) $ticket_id ) ; } add_action('wpas_ticket_before_close_by_agent', 'wpas_my_ticket_before_close_by_agent', 10, 1);
Version 3.0.0