WC_Cart::__clone()publicWC 1.0

When cloning, ensure object properties are handled.

These properties store a reference to the cart, so we use new instead of clone.

Method of the class: WC_Cart{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->__clone();

WC_Cart::__clone() code WC 8.7.0

public function __clone() {
	$this->session  = clone $this->session;
	$this->fees_api = clone $this->fees_api;

	$this->session->set_cart( $this );
}