How can I change/add/remove the status labels (open, close, etc.)?

Our Custom Status extension allows you to easily add and remove statuses.  However, if you would like to write the code yourself read on!

Ticket “states” are filtered by the hook wpas_ticket_statuses. The hook passes an array of registered statuses where the key is the status ID and the value is the status label.

Adding Custom Status

add_filter( 'wpas_ticket_statuses', 'wpas_my_custom_status' );
function wpas_my_custom_status( $status ) {
	$status['my_custom_status'] = 'My Custom Status';
	return $status;
}

Removing Status

add_filter( 'wpas_ticket_statuses', 'wpas_my_custom_status' );
function wpas_my_custom_status( $status ) {
	unset( $status['id_of_status_to_remove'] );
	return $status;
}

Editing a Status

add_filter( 'wpas_ticket_statuses', 'wpas_my_custom_status' );
function wpas_my_custom_status( $status ) {
	$status['id_of_status_to_edit'] = 'My New Label';
	return $status;
}

You can add the above snippets in your theme’s functions.php.

Smart Chat
Smart Replies add-on Chat X