WC_Order_Item_Shipping::get_tax_statuspublicWC 1.0

Get tax status for the shipping method.

This looks up the tax status for the shipping method based on the instance ID, and falls back to the default tax status.

Method of the class: WC_Order_Item_Shipping{}

No Hooks.

Returns

String.

Usage

$WC_Order_Item_Shipping = new WC_Order_Item_Shipping();
$WC_Order_Item_Shipping->get_tax_status( $context );
$context(string)
What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'

WC_Order_Item_Shipping::get_tax_status() code WC 10.4.3

public function get_tax_status( $context = 'view' ) {
	$shipping_method = \WC_Shipping_Zones::get_shipping_method( $this->get_instance_id() );
	return $shipping_method instanceof \WC_Shipping_Method ? $shipping_method->tax_status : ProductTaxStatus::TAXABLE;
}