WordPress at Your Fingertips
function is not described

WC_Cart::__clone() public WC 1.0

When cloning, ensure object properties are handled.

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

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Cart::__clone() WC 5.6.0

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