If you want to apply this term filter to all queries on the site, then you’ll want to use the ‘parse_query’ action. This action will accept the WP_Query instance as a parameter, which will allow you to add a term filter based on the $_SESSION variable.