WC_Cart::set_total
Set cart total.
Method of the class: WC_Cart{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Cart = new WC_Cart(); $WC_Cart->set_total( $value );
- $value(string) (required)
- Value to set.
Changelog
| Since 3.2.0 | Introduced. |
WC_Cart::set_total() WC Cart::set total code WC 10.7.0
public function set_total( $value ) {
$this->totals['total'] = wc_format_decimal( $value, wc_get_price_decimals() );
}