bp_pre_user_query_construct filter missing during AJAX call
-
Warning in advance: I rarely, if ever, use WP – so please bare with me, and I apologise if any of my terminology is way off base!
I’m using BuddyPress Profile Search (BPS) for member searches and the initial search form I’ve created works as expected, but when using AJAX to get more results a specific BP filter (bp_pre_user_query_construct) that needs to run is missing. This filter is used to run a function that modifies the BP_User_Query object by adding IDs to ‘include’, based on the BPS form fields.
When I say ‘missing’, I mean it’s not part of the $wp_filters array when do_action_ref_array is executed to trigger the filter (line 171 of bp-core-classes.php). I found this when debugging the do_action_ref_array function, if I debug the code at line 556 (the if statement that locates the filter in $wp_filters) it returns due to not being found, and so isn’t executed.
I really hope that makes sense to someone. I’m not sure why this specific filter is missing, as it seems the rest do exist (or a lot of them do).
Any help would be appreciated!
- The topic ‘bp_pre_user_query_construct filter missing during AJAX call’ is closed to new replies.