WC_Session_Handler::delete_session( int $customer_id )
Delete the session from the cache and database.
Description Description
Parameters Parameters
- $customer_id
-
(Required) Customer ID.
Source Source
File: includes/class-wc-session-handler.php
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,
)
);
}