<?php
/** adds a facetwp_is_main_query filter to fix compatibility with
** Ultimate GDPR & CCPA Plugin plugin
** prevents facet from identifying the ct_ugdpr_service used
** by the plugin as the main query for filtering
**/
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
if ( 'ct_ugdpr_service' == $query->get( 'post_type' ) ) {
$is_main_query = false;
}
return $is_main_query;
}, 10, 2 );