Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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;
}
@baggiesmad

This comment has been minimized.

Copy link

@baggiesmad baggiesmad commented Apr 11, 2018

Does this work with the most recent release of Woocom?

@acal

This comment has been minimized.

Copy link

@acal acal commented Oct 9, 2018

Does this work with the most recent release of Woocom?

This worked for me on Woo 3.4.5. Thanks Mike!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.