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.


null. Nothing.


$WC_Cart = new WC_Cart();

Code of WC_Cart::__clone() WC 5.6.0

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