Awesome Support Developer Documentation



$open_session = apply_filters( 'wpas_initiate_session_flag', true )

Typical Usage

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.

Example Usage

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;

First Available

Version 4.3.1

More Topics In Filter Hooks