I noticed the following mistakes in your code that is might be the reason it's not working
relation
can not be used with tax_query
with only one inner query
tax_query
should be only two arrays deep instead of three
as pre_get_posts
is an action, it doesn't need returning)
"filter" was misspelt as "fillter"
I've also added sanitisation of the query string variable you're bringing in, by way of absint() given it is a term_id
function modify_query($query) {
if( ! is_admin() && $query->is_main_query() && $query->query_vars['post_type'] == 'product') {
if( isset( $_GET['filter'] ) ) {
$query->set( 'tax_query', array (
array(
'taxonomy' => 'pc_filters',
'field' => 'term_id',
'terms' => absint( $_GET['filter'] ),
)
));
}
}
}
add_action( 'pre_get_posts', 'modify_query' );
The above code should work for you