Making WooCommerce Tickets Searchable + In Shop Archives By Default

Home Forums Ticket Products Event Tickets Plus Making WooCommerce Tickets Searchable + In Shop Archives By Default

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1002920
    Trena De Landro
    Participant

    Hey guys,

    We’re currently rebuilding our site from scratch, and will be using WooCommerce Tickets + The Events Calendar Pro. We’d like for all new WooCommerce ticket posts created within the plugin’s interface to be visible in both search and the shop archives.

    I know we can manually edit product visibility settings within WooCommerce to include them in these loops, but where in the plugin’s code can we modify the default behavior for new tickets? We’re comfortable modifying PHP files.

    Thank you!

    #1003114
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help out here.

    I came up with this snippet that changed the default visibility to Catalog/search for all tickets:

    https://gist.github.com/jesseeproductions/5768685acc4cd48cdd81

    Add that to your theme’s functions.php and that should do it.

    For reference the coding that controls the visibility is found in this file:

    wootickets\src\Tribe\Main.php

    In this method:

    save_ticket

    You could also use either of these hooks if that one is to general:

    wootickets_after_update_ticket

    wootickets_after_create_ticket

    Let me know how that works out.

    Thanks

    #1007830
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Making WooCommerce Tickets Searchable + In Shop Archives By Default’ is closed to new replies.