WordPress at Your Fingertips
function is not described

WC_Cart_Fees::__construct() public WC 3.2.0

Constructor. Reference to the cart.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Cart_Fees = new WC_Cart_Fees();
$WC_Cart_Fees->__construct( $cart );
$cart(WC_Cart) (required) (passed by reference — &)
Cart object.

Changelog

Since 3.2.0 Introduced.

Code of WC_Cart_Fees::__construct() WC 5.6.0

public function __construct( &$cart ) {
	if ( ! is_a( $cart, 'WC_Cart' ) ) {
		throw new Exception( 'A valid WC_Cart object is required' );
	}

	$this->cart = $cart;
}