WC_Cart::get_shipping_tax_amount
Get a tax amount.
Method of the class: WC_Cart{}
No Hooks.
Returns
float. amount
Usage
$WC_Cart = new WC_Cart(); $WC_Cart->get_shipping_tax_amount( $tax_rate_id );
- $tax_rate_id(string) (required)
- ID of the tax rate to get taxes for.
WC_Cart::get_shipping_tax_amount() WC Cart::get shipping tax amount code WC 10.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;
}