WC_Cart::set_cart_contents()publicWC 1.0

Sets the contents of the cart.

Method of the class: WC_Cart{}

No Hooks.

Return

null. 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 8.9.0

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