WordPress at Your Fingertips
function is not described

WC_Cart::set_cart_contents() public WC 1.0

Sets the contents of the cart.

{} It's a method of the class: WC_Cart{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Cart::set_cart_contents() WC 5.7.1

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