Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Statistics issue when user presses 'return' › Reply To: Statistics issue when user presses 'return'
October 20, 2021 at 3:18 pm
#35227
Keymaster
Can you please try this variation instead:
add_filter('asp_results', 'asp_add_stat_noajax', 10, 4);
function asp_add_stat_noajax($results, $id, $is_ajax, $args) {
if ( !$is_ajax ) {
asp_statistics::addKeyword($id, $args['s']);
}
return $results;
}
Also, make sure the search override feature is enabled, otherwise the plugin may not trigger.