Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3728168
Hidden Bundles on single product
Open

Comments

  •  1
    Daniel Zilahi started the conversation

    There are a few bundles that are still hidden from the public, but I will send their links to partners (B2B).
    Unfortunately these hidden bundles are visible on the single product page among the other bundles.
    What can I do? Can I hide them with a code until they are public? Maybe there is some kind of setting for it?

  •  1,222
    Dustin replied

    Hi Daniel,

    Please add the custom code below. (How to add custom code? ↗):

    add_filter( 'woosb_get_bundles', function ( $bundles ) {
        foreach ( $bundles as $key => $bundle ) {
            if ( ! $bundle->is_visible() ) {
                unset( $bundles[ $key ] );
            }
        }
        return $bundles;
    } );

    Let me know if it works as you expected.

    Best regards,
    Dustin

  •  1
    Daniel Zilahi replied

    Thank you! The code works great.

  •  1,222
    Dustin replied

    You're welcome!

    If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ rating. https://wordpress.org/support/plugin/woo-product-bundle/reviews?rate=5#new-post Thank you in advance! ♥

    Best regards,
    Dustin