WC_Cart_Session::__construct( WC_Cart $cart )
Sets up the items provided, and calculate totals.
Description Description
Parameters Parameters
- $cart
-
(Required) Cart object to calculate totals for.
Source Source
File: includes/class-wc-cart-session.php
public function __construct( &$cart ) { if ( ! is_a( $cart, 'WC_Cart' ) ) { throw new Exception( 'A valid WC_Cart object is required' ); } $this->cart = $cart; }
Changelog Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |