WordPress at a glance
function is not described

wc_empty_cart() WC 1.0

Clears the cart session when called.

No Hooks.

Return

null. Nothing.

Usage

wc_empty_cart();

Code of wc_empty_cart() WC 5.3.0

<?php
function wc_empty_cart() {
	if ( ! isset( WC()->cart ) || '' === WC()->cart ) {
		WC()->cart = new WC_Cart();
	}
	WC()->cart->empty_cart( false );
}