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

Okay
  Public Ticket #3148251
Edit Frequently Bought Together Item Quantity
Closed

Comments

  • Mike K started the conversation

    We need to know how to edit the frequently bought together items from 5 items to 3 items.

  •  767
    Janilyn replied

    Hi Mike,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  153
    Henry replied

    Hi,

    Please add the below custom code (How to add custom code?)

    // Wpclever team support ticket-3148251
    add_filter( 'woobt_show_items', function($items){
        if( is_array($items) && count($items) > 3 ) {
            
            $temp = [];
            for( $i = 0; $i < count($items); $i++ ) {
                if( $i < 3 ) {
                    $temp[] = $items[$i];
                }
            }
            if( count($temp) ) {
                return $temp;
            }
        }
        return $items;
    }, 99 );

    Best regards,
    Henry N.