WordPress at Your Fingertips
function is not described

WC_Cart_Session::persistent_cart_destroy() public WC 1.0

Delete the persistent cart permanently.

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

Hooks from the method

Return

null. Nothing.

Usage

$WC_Cart_Session = new WC_Cart_Session();
$WC_Cart_Session->persistent_cart_destroy();

Code of WC_Cart_Session::persistent_cart_destroy() WC 5.9.0

public function persistent_cart_destroy() {
	if ( get_current_user_id() && apply_filters( 'woocommerce_persistent_cart_enabled', true ) ) {
		delete_user_meta( get_current_user_id(), '_woocommerce_persistent_cart_' . get_current_blog_id() );
	}
}