Skip to content

Instantly share code, notes, and snippets.

@WPprodigy
Last active November 22, 2017 18:58
Show Gist options
  • Save WPprodigy/08844633bceaab3ee26db814939eab0c to your computer and use it in GitHub Desktop.
Save WPprodigy/08844633bceaab3ee26db814939eab0c to your computer and use it in GitHub Desktop.
Edit the amount and columns of up-sells on the single product page in WooCommerce
add_filter( 'woocommerce_upsells_total', 'wc_ninja_edit_upsells_total', 10 );
function wc_ninja_edit_upsells_total( $limit ) {
return 8;
}
add_filter( 'woocommerce_upsells_columns', 'wc_ninja_edit_upsells_columns', 10 );
function wc_ninja_edit_upsells_columns( $columns ) {
return 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment