Closed gjrowe closed 3 years ago
Good call. A feature would be nice. Duly noted with thanks.
Just today we figured out that it can be possible with a filter hook already available with NanoSupport v0.6.0. You can put the following code in your theme's functions.php
or in a separate plugin:
/**
* Tweak NanoSupport Tickets to be 'open' by default.
* @param array $data Array of Ticket data.
* @return array Array of modified ticket data.
*/
function my_tweak_ns_ticket_status_to_private( $data ) {
if ( ! ns_is_user( 'manager' ) ) {
$data['post_status'] = 'private';
}
return $data;
}
add_filter( 'ns_ticket_data', 'my_tweak_ns_ticket_status_to_private' );
All the tickets submitted by the 'non-manager' would get the 'private' status instead of 'pending'. 😃
Currently all tickets when submitted are unpublished and are "Pending". It would be good if we could opt to have them auto publish and go to "Open" status.