WC_Cart::get_totals_var()
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 Cart::get totals var WC 6.7.0
protected function get_totals_var( $key ) { return isset( $this->totals[ $key ] ) ? $this->totals[ $key ] : $this->default_totals[ $key ]; }