From 0da6df8aed2fb0378a0e30efc660ab4552d6e98f Mon Sep 17 00:00:00 2001 From: James Koster Date: Tue, 23 Jul 2013 10:52:15 +0100 Subject: [PATCH] make upsells order filterable --- woocommerce-template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/woocommerce-template.php b/woocommerce-template.php index b09a542f0c6..617086ee50c 100644 --- a/woocommerce-template.php +++ b/woocommerce-template.php @@ -814,9 +814,9 @@ if ( ! function_exists( 'woocommerce_upsell_display' ) ) { */ function woocommerce_upsell_display( $posts_per_page = '-1', $columns = 2, $orderby = 'rand' ) { woocommerce_get_template( 'single-product/up-sells.php', array( - 'posts_per_page' => $posts_per_page, - 'orderby' => $orderby, - 'columns' => $columns + 'posts_per_page' => $posts_per_page, + 'orderby' => apply_filters( 'woocommerce_upsells_orderby', $orderby ), + 'columns' => $columns ) ); } }