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.

Метод класса: WC_Order_Item_Shipping{}

Хуков нет.

Возвращает

Строку.

Использование

$WC_Order_Item_Shipping = new WC_Order_Item_Shipping();
$WC_Order_Item_Shipping->get_tax_status( $context );
$context(строка)
What the value is for. Valid values are 'view' and 'edit'.
По умолчанию: 'view'

Код WC_Order_Item_Shipping::get_tax_status() WC 10.5.2

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