wpsc_clear_cart

Located in: cart.class.php

Functions that call this hook: wpsc_cart::empty_cart()

Arguments Accepted: $wpsc_cart

Version Introduced: 3.8.9

Description: This action is triggered when the cart is emptied.

Code in context:

[php firstline=”1023″ highlight=”1036″]

function empty_cart($fromwidget = true) {

global $wpdb;

$wpdb->query($wpdb->prepare("DELETE FROM `".WPSC_TABLE_CLAIMED_STOCK."` WHERE `cart_id` IN (‘%s’);", $this->unique_id));

$this->cart_items = array();

$this->cart_item = null;

$this->cart_item_count = 0;

$this->current_cart_item = -1;

$this->coupons_amount = 0;

$this->coupons_name = ”;

$this->clear_cache();

$this->cleanup();

do_action( ‘wpsc_clear_cart’, $this );

}

[/php]