Created
October 15, 2017 08:43
-
-
Save dr5hn/3d82542fa1f9b9bb3fc913d8687edb10 to your computer and use it in GitHub Desktop.
How to change Number of Upsell products displayed on Single Product Page in Woocommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Changing Number of Upsell products display on Single Product page -- By Darshan Gada | |
add_filter( 'woocommerce_output_related_products_args', 'wc_change_number_related_products' ); | |
function wc_change_number_related_products( $args ) { | |
$args['posts_per_page'] = 1; | |
$args['columns'] = 4; //change number of upsells here | |
return $args; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment