Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Forked from jameskoster/functions.php
Created September 19, 2012 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mikejolley/3748689 to your computer and use it in GitHub Desktop.
Save mikejolley/3748689 to your computer and use it in GitHub Desktop.
WooCommerce - Change number of upsells displayed and # of products per row
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display');
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_upsells', 20);
if (!function_exists('woocommerce_output_upsells')) {
function woocommerce_output_upsells() {
woocommerce_upsell_display(3,3); // Display 3 products in rows of 3
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment