WordPress at Your Fingertips
function is not described

WC_Session_Handler::delete_session() public WC 1.0

Delete the session from the cache and database.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Session_Handler = new WC_Session_Handler();
$WC_Session_Handler->delete_session( $customer_id );
$customer_id(int) (required)
Customer ID.

Code of WC_Session_Handler::delete_session() WC 5.9.0

public function delete_session( $customer_id ) {
	global $wpdb;

	wp_cache_delete( $this->get_cache_prefix() . $customer_id, WC_SESSION_CACHE_GROUP );

	$wpdb->delete(
		$this->_table,
		array(
			'session_key' => $customer_id,
		)
	);
}