WC_Cart::__clone()
When cloning, ensure object properties are handled.
These properties store a reference to the cart, so we use new instead of clone.
Метод класса: WC_Cart{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Cart = new WC_Cart(); $WC_Cart->__clone();
Код WC_Cart::__clone() WC Cart:: clone WC 8.7.0
public function __clone() { $this->session = clone $this->session; $this->fees_api = clone $this->fees_api; $this->session->set_cart( $this ); }