woocommerce_upsells_display order filter added

This commit is contained in:
itzmekhokan 2019-11-11 22:35:32 +05:30
parent a6819ad495
commit 0716648c28
1 changed files with 2 additions and 0 deletions

View File

@ -1948,6 +1948,7 @@ if ( ! function_exists( 'woocommerce_upsell_display' ) ) {
array( array(
'posts_per_page' => $limit, 'posts_per_page' => $limit,
'orderby' => $orderby, 'orderby' => $orderby,
'order' => $order,
'columns' => $columns, '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 ) ); 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 ); $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 ); $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. // Get visible upsells then sort them at random, then limit result set.