FacetWP – exclude certain terms from the WC shop archive

<?php

add_action( 'pre_get_posts', function( $query ) {
    if ( $query->is_shop() ) {
        $query->tax_query = array(
            'relation' => 'AND',
            array(
                'taxonomy' => 'category',
                'operator' => 'NOT IN',
                'value' => 'custom-tile',
                'field' => 'slug'
            ),
            array(
                'taxonomy' => 'post_tag',
                'compare' => 'NOT IN',
                'value' => 'sample',
                'field' => 'slug'
            )
        );
    }
} );