WordPress at Your Fingertips
function is not described

WC_Cart::get_totals_var() protected WC 3.2.0

Get a total.

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

No Hooks.

Return

Mixed.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_totals_var( $key );
$key(string) (required)
Key of element in $totals array.

Changelog

Since 3.2.0 Introduced.

Code of WC_Cart::get_totals_var() WC 5.6.0

protected function get_totals_var( $key ) {
	return isset( $this->totals[ $key ] ) ? $this->totals[ $key ] : $this->default_totals[ $key ];
}