Convert wc_shipping_zone_method_order_uasort_comparison to use wc_uasort_comparison

This commit is contained in:
Gerhard 2018-10-31 07:40:08 +02:00
parent 21ad281850
commit f844582976
1 changed files with 2 additions and 4 deletions

View File

@ -1514,15 +1514,13 @@ function wc_product_attribute_uasort_comparison( $a, $b ) {
* @return int
*/
function wc_shipping_zone_method_order_uasort_comparison( $a, $b ) {
if ( $a->method_order === $b->method_order ) {
return 0;
}
return ( $a->method_order < $b->method_order ) ? -1 : 1;
return wc_uasort_comparison( $a->method_order, $b->method_order );
}
/**
* User to sort two values with ausort.
*
* @since 3.5.1
* @param int $a First value to compare.
* @param int $b Second value to compare.
* @return int