Queryfix for WooCommerce Memberships and FacetWP
<?php
/**
* Queryfix for WooCommerce Memberships and FacetWP
*/
function yanco_facetwp_woocommerce_memberships_query_fix( $is_main_query, $query ) {
if ( 'wc_user_membership' == $query->get( 'post_type' ) ) {
$is_main_query = false;
}
return $is_main_query;
}
add_filter( 'facetwp_is_main_query', 'yanco_facetwp_woocommerce_memberships_query_fix', 10, 2 );