WordPress at Your Fingertips
function is not described

WC_Cart::get_cart_shipping_total() public WC 1.0

Gets the shipping total (after calculation).

{} It's a method of the class: WC_Cart{}

Hooks from the method
Return

String. price or string for the shipping total

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->get_cart_shipping_total();

Code of WC_Cart::get_cart_shipping_total() WC 5.6.0

public function get_cart_shipping_total() {

	// Default total assumes Free shipping.
	$total = __( 'Free!', 'woocommerce' );

	if ( 0 < $this->get_shipping_total() ) {

		if ( $this->display_prices_including_tax() ) {
			$total = wc_price( $this->shipping_total + $this->shipping_tax_total );

			if ( $this->shipping_tax_total > 0 && ! wc_prices_include_tax() ) {
				$total .= ' <small class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>';
			}
		} else {
			$total = wc_price( $this->shipping_total );

			if ( $this->shipping_tax_total > 0 && wc_prices_include_tax() ) {
				$total .= ' <small class="tax_label">' . WC()->countries->ex_tax_or_vat() . '</small>';
			}
		}
	}
	return apply_filters( 'woocommerce_cart_shipping_total', $total, $this );
}