WC_Tax::_get_tax_rate( int $tax_rate_id, string $output_type = ARRAY_A )

Get tax rate.


Description Description

Internal use only.


Parameters Parameters

$tax_rate_id

(Required) Tax rate ID.

$output_type

(Optional) Type of output.

Default value: ARRAY_A


Top ↑

Return Return

(array|object)


Top ↑

Source Source

File: includes/class-wc-tax.php

	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
		);
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.