Change Ticket Visibility on WooCommerce shop pages Globally

Home Forums Ticket Products Event Tickets Plus Change Ticket Visibility on WooCommerce shop pages Globally

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1377844
    Pat
    Participant

    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' );

    }

    #1378603
    Cliff
    Member

    Hi, Pat.

    I’m not sure where you found that, but it looks like it’s from WooCommerce prior to version 3.

    Please give this code snippet a thorough read-through to see if it’d be a good fit for you:

    https://gist.github.com/cliffordp/c012f2945a22867a3af2c2878e06fffd

    #1395848
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Change Ticket Visibility on WooCommerce shop pages Globally’ is closed to new replies.