WooCommerce – Change number of displayed upsells on product pages

add_filter( 'woocommerce_upsell_display_args', 'custom_woocommerce_upsell_display_args' );
function custom_woocommerce_upsell_display_args( $args ) {
$args['posts_per_page'] = 5; // Change this number
$args['columns'] = 5; // This is the number shown per row.
return $args;
}

view raw
functions.php
hosted with ❤ by GitHub

Posted by Mike Jolley

I help build things at Automattic.