WooCommerce Catalog Visibility

Home Forums Ticket Products Event Tickets Plus WooCommerce Catalog Visibility

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1271921
    Johannes
    Participant

    Hello,

    By default new tickets should be set to hidden with Events Tickets Plus – correct?
    If so, this feature is not working – at least in the newest WooCommerce and Events Tickets Plus version.

    I believe instead of updating it through update_post_meta( $ticket->ID, ‘_visibility’, ‘hidden’ );
    the product_attributes needs to be updated.

    Thank you!

    #1272493
    Geoff B.
    Member

    Good evening Johannes  and welcome back!

    Thank you for reaching out to us.

    We apologize for the inconvenience caused by this glitch.
    We are actively working on a solution for this.

    Alas, I cannot guarantee when it will be fixed, as it’s in the development team’s hands now.
    They need to assign it, code it, test it, and schedule it for release.

    The good news is that you will be contacted as soon as a fix is available.
    Thank you for your patience as we see this through.

    In the meantime, short you could apply the following snippet in the functions.php file of your theme (without the PHP tag at the top): https://gist.github.com/GeoffEW/dc504166ac629c226fa9b1f8988bf082

    This will force all of your tickets to become hidden.

    Best regards,
    Geoff B.

    #1272598
    Johannes
    Participant

    Thank you for checking into it. Unfortunately, the snippet did not work. WooCommerce must keep track differently of the visibility option. I think they moved it to a taxonomy but I am not sure. (I know your hook works though since I use other actions in it). However, since this is not an urgent issue, I will wait for the fix.

    Thanks again.

    #1272656
    Philip
    Participant

    As of WooCommerce 3.0; visibility is stored as a taxonomy term instead of post meta. Try this instead.

    function tribe_events_woo_change_visibility( $ticket_ID ) {
    	if ($product = wc_get_product($ticket_ID)) {
    		$product->set_catalog_visibility('hidden');
    		$product->save();
    	}	
    }

    Note: I am not affiliated with Modern Tribe/The Events Calendar.

    #1272696
    Johannes
    Participant

    That worked. Thank you!

    #1272709
    Geoff B.
    Member

    Good afternoon,

    Major props to @first4websites here.

    I am super stoked that this worked for you Johannes.

    You are welcome back in our support forums any time 🙂

    For now, I am going to close this thread.

    Have a good weekend,

    Geoff B.

    #1279191
    Nico
    Member

    Hi there,

    Just wanted to share with you that a new maintenance release (for the Week of 1st May 2017) is out, including a fix for this issue 🙂

    Find out more about the release → https://theeventscalendar.com/maintenance-release-week-1st-may-2017/

    Please update the plugins and let us know if the fix works for your site,
    Best,
    Nico

    #1279246
    Johannes
    Participant

    Thank you!

    Yes, it took care of the catalog visibility. However, it still would be
    nice if new tickets are automatically marked as non taxable. But, I have it
    set it with a little code snippet. So, no need to change it for me.

    Johannes

    —————————————————————————-

    • This reply was modified 8 years, 11 months ago by Johannes.
    • This reply was modified 8 years, 11 months ago by Johannes.
    #1279740
    Geoff B.
    Member

    Good evening Johannes,

    Thank you once again for your patience AND help.

    I totally agree that such a feature would be useful.
    The good news is that out of code snippets, extensions are created 🙂

    You are welcome back in our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘WooCommerce Catalog Visibility’ is closed to new replies.