FacetWP – index disabled variations (post_status = private)

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

// Add to your (child) theme’s functions.php

add_filter( ‘facetwp_indexer_query_args’, function( $args ) {
if ( in_array( ‘product’, (array) $args[‘post_type’] ) ) {
$args[‘post_status’] = [ ‘publish’, ‘private’ ];
}
return $args;
}, 20 );
{{/gist}}