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.


Top ↑

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,
			)
		);
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.