WordPress at a glance
function is not described

WC_Tax::get_rate_percent() public WC 1.0

Return a given rates percent.

{} It's a method of the class: WC_Tax{}

Hooks from the method

String. Nothing.


$result = WC_Tax::get_rate_percent( $key_or_rate );
$key_or_rate(mixed) (required)
Tax rate ID, or the db row itself in object format.

Code of WC_Tax::get_rate_percent() WC 5.3.0

public static function get_rate_percent( $key_or_rate ) {
	$rate_percent_value = self::get_rate_percent_value( $key_or_rate );
	$tax_rate_id        = is_object( $key_or_rate ) ? $key_or_rate->tax_rate_id : $key_or_rate;
	return apply_filters( 'woocommerce_rate_percent', $rate_percent_value . '%', $tax_rate_id );