WC_Cart::get_shipping_tax_amount()
Get a tax amount.
Метод класса: WC_Cart{}
Хуков нет.
Возвращает
float
. amount
Использование
$WC_Cart = new WC_Cart(); $WC_Cart->get_shipping_tax_amount( $tax_rate_id );
- $tax_rate_id(строка) (обязательный)
- ID of the tax rate to get taxes for.
Код WC_Cart::get_shipping_tax_amount() WC Cart::get shipping tax amount WC 8.7.0
public function get_shipping_tax_amount( $tax_rate_id ) { $taxes = $this->get_shipping_taxes(); return isset( $taxes[ $tax_rate_id ] ) ? $taxes[ $tax_rate_id ] : 0; }