Hi, I'm working on a site running version 3.5.1 of WordPress with the WP E-commerce plugin installed. The client wanted to exclude a number of posts from the search results page, so I installed the Search Exclude plugin (http://wordpress.org/plugins/search-exclude/). I gave the plugin a test, but it didn't seem to do anything.
After a bit of digging, I found that when WP E-commerce was active, it was stopping the Search Exclude plugin from working.
I dumped the functions hooked to the
Array (  => Array ( [0000000021703a1a0000000023da960esearchFilter] => Array ( [function] => Array (  => SearchExclude Object ( )  => searchFilter ) [accepted_args] => 1 ) [0000000021703b180000000023da960eget_posts] => Array ( [function] => Array (  => WPSC_Hide_subcatsprods_in_cat Object ( [q] => )  => get_posts ) [accepted_args] => 1 ) )  => Array ( [_wpsc_pre_get_posts_reset_taxonomy_globals] => Array ( [function] => _wpsc_pre_get_posts_reset_taxonomy_globals [accepted_args] => 1 ) )  => Array ( [wpsc_split_the_query] => Array ( [function] => wpsc_split_the_query [accepted_args] => 1 ) ) )
wpsc_split_the_query appear to run fine, however, the last two aren't running at all.
After a bit of playing, I found that at the end of the
wpsc_split_the_query method, there is the following:
remove_filter( 'pre_get_posts', 'wpsc_split_the_query', 8 );
If I comment that line out, all of the hooked functions run. Leave it in, and only 2/4 run. I tried outputting the list of hooked functions again, after the
do_action, and the two functions that didn't run were still hooked, so they hadn't been removed, but just didn't run :/
Does anyone know why that would be the case?