WC_Tax::find_shipping_rates()
Searches for all matching country/state/postcode tax rates.
Метод класса: WC_Tax{}
Хуков нет.
Возвращает
Массив
.
Использование
$result = WC_Tax::find_shipping_rates( $args );
- $args(массив)
- Args that determine the rate to find.
По умолчанию: array()
Код WC_Tax::find_shipping_rates() WC Tax::find shipping rates WC 9.8.2
public static function find_shipping_rates( $args = array() ) { $rates = self::find_rates( $args ); $shipping_rates = array(); if ( is_array( $rates ) ) { foreach ( $rates as $key => $rate ) { if ( 'yes' === $rate['shipping'] ) { $shipping_rates[ $key ] = $rate; } } } return $shipping_rates; }