WordPress at Your Fingertips
function is not described

WC_Product_Variation::get_tax_class() public WC 1.0

Returns the tax class.

Does not use get_prop so it can handle 'parent' inheritance correctly.

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

Hooks from the method
Return

String.

Usage

$WC_Product_Variation = new WC_Product_Variation();
$WC_Product_Variation->get_tax_class( $context );
$context(string)
view, edit, or unfiltered.
Default: 'view'

Code of WC_Product_Variation::get_tax_class() WC 5.6.0

public function get_tax_class( $context = 'view' ) {
	$value = null;

	if ( array_key_exists( 'tax_class', $this->data ) ) {
		$value = array_key_exists( 'tax_class', $this->changes ) ? $this->changes['tax_class'] : $this->data['tax_class'];

		if ( 'edit' !== $context && 'parent' === $value ) {
			$value = $this->parent_data['tax_class'];
		}

		if ( 'view' === $context ) {
			$value = apply_filters( $this->get_hook_prefix() . 'tax_class', $value, $this );
		}
	}
	return $value;
}