Tickets displaying in shop

Home Forums Ticket Products Event Tickets Plus Tickets displaying in shop

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #63074
    vinvalentino
    Participant

    I do not want tickets showing up in the main shop page, and I read another post that said they’re hidden by default, but it doesn’t appear so. How do I hide them?

    I tried the fix posted here: https://theeventscalendar.com/support/forums/topic/how-to-hide-the-woocommerce-ticket-category/#post-45103
    but it didn’t change anything. Do I need to change anything in that code or leave it as-is?

    #63124
    Kelly
    Participant

    Hi, vinvalentino. I see that you’re using the current version of WooCommerce Tickets. Given that that’s the case, I’d recommend you avoid using older snippets as they are unlikely to work correctly. It’s probably a good idea to remove it.

    You are correct that tickets have their catalog visibility set to hidden by default. That can be changed by editing the ticket in the WooCommerce Product Editor.

    I took a look at your site, but I don’t see the tickets showing up in your shop. Would you mind linking to a screenshot so that I can help you troubleshoot?

    #63993
    vinvalentino
    Participant

    I\’ve added the following code to my theme functions.php file to try to get the tickets category to go away, and nothing I do seems to work.

    add_action( \’pre_get_posts\’, \’custom_pre_get_posts_query\’ );
    function custom_pre_get_posts_query( $q )
    {

    if (!$q->is_main_query() || !is_shop()) return;
    if ( ! is_admin() )
    {
    $q->set( \’tax_query\’, array(array(
    \’taxonomy\’ => \’product_cat\’,
    \’field\’ => \’id\’,
    \’terms\’ => array( 57 ),
    \’operator\’ => \’NOT IN\’
    )));

    }
    }

    It\’s like WooTickets is overriding everything and forcing the tickets category to show up on the shop page.

    #64058
    Kelly
    Participant

    Hi, vinvalentino. Thanks for your post.

    Regarding your original question, I just want to confirm what the problem is since, per my last post, it looks to me as if tickets are not showing in the storefront and that’s expected behaviour.

    Regarding your second question, we can’t really help with customizations of that nature – but if you basically want to propose a change in how our plugin behaves you can do so here: https://tribe.uservoice.com/forums/195723-feature-ideas

    Thanks!

    #64114
    vinvalentino
    Participant

    I just renamed it to “Courses”. Do you see that there?

    #64330
    Kelly
    Participant

    Hi, vinvalentino. Thanks for clarifying.

    First, please confirm that you have removed the snippet from your functions.php. (It won’t work.) Then, I would recommend that you delete the Courses category from the shop.

    Please let us know how that works for you. Cheers!

    #66619
    Kelly
    Participant

    Hi, vinvalentino. Hope things have been going well for you since your last post.

    As it’s been over two weeks since we heard from you, I’m going to close this thread. Please feel free to create a new topic if there’s anything else we can do to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Tickets displaying in shop’ is closed to new replies.