You need to hook that in order to increase the number. I don’t believe anything’s changed there, but I could be wrong. If you’re comfortable with code you can simply add these hooks. Default is usually 2
For Cross Sell
// Set the number of items to show on Cross Sell.
function tbg_cross_sells_custom_totals($total) {
$total = 26; //Whatever number. I made a carousel for my client
return $total;
}
add_filter( 'woocommerce_cross_sells_total', 'tbg_cross_sells_custom_totals', 99 );
For Upsell
add_filter('woocommerce_upsell_display_args', 'tbg_upsell_display');
function tbg_upsell_display($args) {
$args['posts_per_page'] = 26; // Change this number to however many upsells you want to show
return $args;
}
In this code snippet, the customize_upsell_display
function modifies the posts_per_page
parameter to control the number of products shown in the upsell area. You can change the number 6
to any number that suits your needs.
You can add this code snippet to your theme’s functions.php
file or a custom plugin. This change will then be reflected in the upsell display on your WooCommerce product pages.