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

Okay
  Public Ticket #3709970
How to not display "bought together products" on mini cart?
Open

Comments

  •  1
    Jane started the conversation

    Hi,


    I would like to display "bought together products" only on single product and checkout cart page but hide on mini cart, any way to do it?


    Regards, Jane


  •  1,222
    Dustin replied

    Hi Jane,

    To hide FBT products on a mini cart, please add the custom code below. (How to add custom code? ↗):

    add_filter( 'woocommerce_widget_cart_item_visible', function ( $visible, $cart_item ) {
        if ( isset( $cart_item['woobt_parent_id'] ) ) {
            return false;
        }
        return $visible;
    }, 10, 2 );

    Best regards,
    Dustin