id = $id; $this->label = $label; $this->cost = $cost; $this->taxes = $taxes ? $taxes : array(); $this->method_id = $method_id; } /** * get_shipping_tax function. * * @return array */ public function get_shipping_tax() { $taxes = 0; if ( $this->taxes && sizeof( $this->taxes ) > 0 && ! WC()->customer->is_vat_exempt() ) { $taxes = array_sum( $this->taxes ); } return apply_filters( 'woocommerce_get_shipping_tax', $taxes, $this ); } }