Forked from woogists/wc-change-number-of-upsells.php
Created
October 3, 2020 19:08
-
-
Save bobwol/c6f0dbee9608ee8e67fb39f0d27bc00f to your computer and use it in GitHub Desktop.
[Theming Snippets] Change number of upsells output
This file contains hidden or 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
| /** | |
| * Change number of upsells output | |
| */ | |
| add_filter( 'woocommerce_upsell_display_args', 'wc_change_number_related_products', 20 ); | |
| 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