Hi @eventaus,
This is a woocommerce customization part, so I am not sure about above code, but I can guide you about to set product as private. As per my knowledge, you can not purchase any private product, so you must need to set it as a public first then only you can buy it. second, if you want to hide from normal users, then you need to set “Catalog visibility” as “Hidden” then you must need third party plugin to restrict the product to specific users or user roles. Plugins like WooCommerce Memberships or WooCommerce Private Store would be helpful to you.
After that, you need to override template file called, “content-tickets-details.php” from sell ticket plugin and in that file you need to add condition based on restriction to view ticket which you set in woo products.
I hope that this will help you to resolve your issue.
Thank you.