Add woocommerce_sort_by_subtotal_callback filter

Closes #11973
This commit is contained in:
Mike Jolley 2016-10-08 13:22:52 +01:00
parent 0dc20c3a58
commit 96f05bb49a
1 changed files with 1 additions and 1 deletions

View File

@ -1228,7 +1228,7 @@ class WC_Cart {
}
// Order cart items by price so coupon logic is 'fair' for customers and not based on order added to cart.
uasort( $cart, array( $this, 'sort_by_subtotal' ) );
uasort( $cart, apply_filters( 'woocommerce_sort_by_subtotal_callback', array( $this, 'sort_by_subtotal' ) ) );
/**
* Calculate totals for items.