WC_Cart::__clone()

When cloning, ensure object properties are handled.


Description Description

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


Source Source

File: includes/class-wc-cart.php

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

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.