Created
February 10, 2017 17:14
-
-
Save mgibbs189/bb92f8219608e47b5562a83503223d0e to your computer and use it in GitHub Desktop.
FacetWP - WooCommerce Memberships fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) { | |
if ( 'wc_user_membership' == $query->get( 'post_type' ) ) { | |
$is_main_query = false; | |
} | |
return $is_main_query; | |
}, 10, 2 ); |
@mgibbs189 curious, do you happen to have any medicine for facet counts not respecting membership access rules?
Filters show numbers, but in reality the user can't see or list any of the items. How do we fix the counts?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fantastic!!! Saved my bacon today as well.... I lost all the rest of my hair before finding this....please put it in the plugin ;-)