WordPress at Your Fingertips
function is not described

WC_Tax::_get_tax_rate() public WC 2.5.0

Get tax rate.

Internal use only.

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

No Hooks.

Return

Array|Object.

Usage

$result = WC_Tax::_get_tax_rate( $tax_rate_id, $output_type );
$tax_rate_id(int) (required)
Tax rate ID.
$output_type(string)
Type of output.
Default: ARRAY_A

Changelog

Since 2.5.0 Introduced.

Code of WC_Tax::_get_tax_rate() WC 5.9.0

public static function _get_tax_rate( $tax_rate_id, $output_type = ARRAY_A ) {
	global $wpdb;

	return $wpdb->get_row(
		$wpdb->prepare(
			"
				SELECT *
				FROM {$wpdb->prefix}woocommerce_tax_rates
				WHERE tax_rate_id = %d
			",
			$tax_rate_id
		),
		$output_type
	);
}