public function get_cart_shipping_total()
{
if (isset($this->shipping_total)) {
if ($this->shipping_total > 0) {
// Display varies depending on settings
if ('excl' === $this->tax_display_cart) {
$return = wc_price($this->shipping_total);
if ($this->shipping_tax_total > 0 && $this->prices_include_tax) {
$return .= ' <small class="tax_label">' . WC()->countries->ex_tax_or_vat() . '</small>';
}
return $return;
} else {
$return = wc_price($this->shipping_total + $this->shipping_tax_total);
if ($this->shipping_tax_total > 0 && !$this->prices_include_tax) {
$return .= ' <small class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>';
}
return $return;
}
} else {
return __('Free!', 'woocommerce');
}
}
return '';
}