WC_Tax::get_rates()public staticWC 1.0

Get's an array of matching rates for a tax class.

Метод класса: WC_Tax{}

Хуков нет.

Возвращает

Массив.

Использование

$result = WC_Tax::get_rates( $tax_class, $customer );
$tax_class(строка)
Tax class to get rates for.
По умолчанию: ''
$customer(объект)
Override the customer object to get their location.
По умолчанию: null

Код WC_Tax::get_rates() WC 8.7.0

public static function get_rates( $tax_class = '', $customer = null ) {
	$tax_class = sanitize_title( $tax_class );
	$location  = self::get_tax_location( $tax_class, $customer );
	return self::get_rates_from_location( $tax_class, $location, $customer );
}