WC_Tax::sort_rates() private WC 1.0
Logical sort order for tax rates based on the following in order of priority.
{} Это метод класса: WC_Tax{}
Хуков нет.
Возвращает
Массив.
Использование
$result = WC_Tax::sort_rates( $rates );
- $rates(массив) (обязательный)
- Rates to be sorted.
Код WC_Tax::sort_rates() WC Tax::sort rates WC 5.0.0
private static function sort_rates( $rates ) {
uasort( $rates, __CLASS__ . '::sort_rates_callback' );
$i = 0;
foreach ( $rates as $key => $rate ) {
$rates[ $key ]->tax_rate_order = $i++;
}
return $rates;
}