$open_session = apply_filters( 'wpas_initiate_session_flag', true )
You can use the wpas_initiate_session_flag filter to disable creating the session object. This would be useful when the traffic is coming from bot sources such as pingdom or uptimerobot.
This filter needs to be defined VERY EARLY in the loading process so best to define it in a MU plugin.
add_filter('wpas_initiate_session_flag', 'wpas_filter_bots', 10, 2); function wpas_filter_bots($result) { // manipulate the $result variable here to set it to true or false. return $result; }
Version 4.3.1