WC_Cart::get_total() – Gets cart total after calculation.

You appear to be a bot. Output may be restricted

Description

Gets cart total after calculation.

Usage

$float = WC_Cart::get_total( $context );

Parameters

$context
( string ) optional default: view – If the context is view, the value will be formatted for display. This keeps it compatible with pre-3.2 versions.

Returns

float

Source

File name: woocommerce/includes/class-wc-cart.php
Lines:

1 to 4 of 4
  public function get_total( $context = 'view' ) {
    $total = apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'total' ) );
    return 'view' === $context ? apply_filters( 'woocommerce_cart_total', wc_price( $total ) ) : $total;
  }
 

 View on GitHub View on Trac