WC_Tax::get_rates
Get's an array of matching rates for a tax class.
Method of the class: WC_Tax{}
No Hooks.
Returns
Array.
Usage
$result = WC_Tax::get_rates( $tax_class, $customer );
- $tax_class(string)
- Tax class to get rates for.
Default: '' - $customer(object)
- Override the customer object to get their location.
Default: null
WC_Tax::get_rates() WC Tax::get rates code WC 10.3.6
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 );
}