Hi Chris,
We actually dropped this behaviour in our 3.11 release, the reason being that for a lot of users it was causing confusion.
As tickets have their product visibility set to hidden by default (ie, so they don’t display in the storefront) adding them to the “Tickets” category meant that where a list of product categories was displayed there would be an entry of “Tickets” but it led customers to what was effectively an empty page.
We did add some hooks to make it easy for customers to re-implement this or similar customizations, though:
- wootickets_after_create_ticket fires when a ticket is first created
- wootickets_after_update_ticket fires if a ticket is subsequently update
- wootickets_after_save_ticket fires on either occasion (update or creation)
So, some code like this would give you a way of reinstating the behaviour:
function categorize_new_tickets( $ticket_id ) {
wp_set_object_terms( $ticket_id, 'Ticket', 'product_cat', true );
}
add_action( 'wootickets_after_create_ticket', 'categorize_new_tickets' );
You might add this to your theme functions.php file or any other suitable place. Does that help?