WC_Session_Handler::cleanup_sessions()
Cleanup session data from the database and clear caches.
Method of the class: WC_Session_Handler{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Session_Handler = new WC_Session_Handler(); $WC_Session_Handler->cleanup_sessions();
WC_Session_Handler::cleanup_sessions() WC Session Handler::cleanup sessions code WC 8.7.0
public function cleanup_sessions() { global $wpdb; $wpdb->query( $wpdb->prepare( "DELETE FROM $this->_table WHERE session_expiry < %d", time() ) ); // @codingStandardsIgnoreLine. if ( class_exists( 'WC_Cache_Helper' ) ) { WC_Cache_Helper::invalidate_cache_group( WC_SESSION_CACHE_GROUP ); } }