Hi, I want new event tickets to be visible in WooCommerce shop pages.
I tried the code below in my functions.php file, but NEW tickets / products are created with visibility set to hide. Can you verify that this code works? I found it in your forums. Also, I do not see any php errors when I run the code.
/*
* The Events Calendar - WooCommerce Tickets - Set Catalog visibility to Catalog/search for all Tickets
* Alternative Hooks:
* wootickets_after_update_ticket
* wootickets_after_create_ticke
* @version 3.12
*/
add_action( 'wootickets_after_save_ticket', 'tribe_events_woo_change_visibility' );
function tribe_events_woo_change_visibility( $ticket_ID ) {
update_post_meta( $ticket_ID, '_visibility', 'visible' );
}