WC_Cart::set_cart_contents
Sets the contents of the cart.
Method of the class: WC_Cart{}
No Hooks.
Returns
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() WC Cart::set cart contents code WC 10.7.0
public function set_cart_contents( $value ) {
$this->cart_contents = (array) $value;
}