wc_get_tax_class_by_tax_id( int $tax_id )

Get tax class by tax id.


Description Description


Parameters Parameters

$tax_id

(Required) Tax ID.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/wc-order-functions.php

function wc_get_tax_class_by_tax_id( $tax_id ) {
	global $wpdb;
	return $wpdb->get_var( $wpdb->prepare( "SELECT tax_rate_class FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = %d", $tax_id ) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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