WC_Cart::set_cart_contents │ public │ WC 1.0

Sets the contents of the cart.

Method of the class: WC_Cart{}

No Hooks.

Returns

void. Nothing (null).

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->set_cart_contents( $value );
$value(array) (required)
Cart array.

WC_Cart::set_cart_contents() code WC 11.3.0

public function set_cart_contents( $value ) {
	$this->cart_contents = (array) $value;
}