From 0716648c2883a0fed7823108548a4ae059104855 Mon Sep 17 00:00:00 2001 From: itzmekhokan Date: Mon, 11 Nov 2019 22:35:32 +0530 Subject: [PATCH] woocommerce_upsells_display order filter added --- includes/wc-template-functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 7d857c43fbd..0667cc9d07a 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -1948,6 +1948,7 @@ if ( ! function_exists( 'woocommerce_upsell_display' ) ) { array( 'posts_per_page' => $limit, 'orderby' => $orderby, + 'order' => $order, 'columns' => $columns, ) ); @@ -1955,6 +1956,7 @@ if ( ! function_exists( 'woocommerce_upsell_display' ) ) { wc_set_loop_prop( 'columns', apply_filters( 'woocommerce_upsells_columns', isset( $args['columns'] ) ? $args['columns'] : $columns ) ); $orderby = apply_filters( 'woocommerce_upsells_orderby', isset( $args['orderby'] ) ? $args['orderby'] : $orderby ); + $order = apply_filters( 'woocommerce_upsells_order', isset( $args['order'] ) ? $args['order'] : $order ); $limit = apply_filters( 'woocommerce_upsells_total', isset( $args['posts_per_page'] ) ? $args['posts_per_page'] : $limit ); // Get visible upsells then sort them at random, then limit result set.