Lets say you want to show 5 accessories in one row. Then use this shortcode:

function filter_woocommerce_upsell_display_args( $array ) { 
    $array = 5;
    return $array; 
// add the filter 
add_filter( 'woocommerce_upsell_display_args', 'filter_woocommerce_upsell_display_args', 10, 1 ); 

3 thoughts on “Change the Number of Accessory Columns

  1. John Mather says:

    Thanks for your excellent plugin. I followed the instructions for “Changing the Position” successfully but couldn’t make this work. Where should i place this code ? Regards, John

  2. ankush says:

    Kindly look at the link i provided. I have changed position of products successfully.
    But, not able to change view of products as per above shortcode.
    Kindly help in this matter.

Leave a Reply

Your email address will not be published. Required fields are marked *