WC_Session_Handler::session_exists
Check if a session exists in the database.
Method of the class: WC_Session_Handler{}
No Hooks.
Returns
true|false.
Usage
// private - for code of main (parent) class only $result = $this->session_exists( $customer_id );
- $customer_id(string) (required)
- Customer ID.
WC_Session_Handler::session_exists() WC Session Handler::session exists code WC 10.3.3
private function session_exists( $customer_id ) {
return $customer_id && null !== $GLOBALS['wpdb']->get_var( $GLOBALS['wpdb']->prepare( 'SELECT session_key FROM %i WHERE session_key = %s', $this->_table, $customer_id ) );
}