wpsc_coupon_select_item_orderby

Located in: coupons.class.php

Functions that call this hook: get_eligible_items()

Arguments Accepted: 'unit_price'

Version Introduced: 3.8.9

Description: Determine how to order cart items before determining which cart items are eligible.

Code in context:

[php firstline=”336″ highlight=”337″]

// sort the items by total price so that we can use this in $this->calculate_discount_conditions()

$orderby = apply_filters( ‘wpsc_coupon_select_item_orderby’, ‘unit_price’ );

$order = apply_filters( ‘wpsc_coupon_select_item_order’ , ‘ASC’ );

$cart_items = $wpsc_cart->get_items( array( ‘orderby’ => $orderby, ‘order’ => $order ) );

$cart_items = array_filter( $cart_items, array( $this, ‘_filter_cart_item_conditions’ ) );

return $cart_items;

[/php]