Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirejordansmith/bc42b47de21646158742943b3771f724 to your computer and use it in GitHub Desktop.
Save hirejordansmith/bc42b47de21646158742943b3771f724 to your computer and use it in GitHub Desktop.
How to change upsell products per row for WooCommerce
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_upsells', 15 );
if ( ! function_exists( 'woocommerce_output_upsells' ) ) {
function woocommerce_output_upsells() {
woocommerce_upsell_display( 5,5 ); // Display 5 products in rows of 5
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment