sts-createticket-after

/**
* Action after the ticket has been created
*
* @since 1.0.0
*
* @param (int)         post ID
* @param (array)     post data
*/

Aftersts_action_ticket_create() has created a new ticket, this action will be peformed. It gives you the newly created post ID as well as the post data of the ticket create form. You could use this action to add custom fields of your own.

 

Exampel:

add_action( 'sts-createticket-after’, 'my_metafields’, 10, 2 );
function my_metafields( $post_id, $post_data ){
if( isset( $post_data[ 'my-data’ ] ) )
update_post_meta( $post_id, 'my-data’, $post_data[ 'my-data’ ] );
}
}