FacetWP – index EDD variable price

mgibbs189

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

// Add to your (child) theme’s functions.php
add_filter( ‘facetwp_index_row’, function( $params, $class ) {
if ( ‘price’ == $params[‘facet_name’] ) {
$price = edd_get_lowest_price_option( $params[‘post_id’] );
$params[‘facet_value’] = $price;
$params[‘facet_display_value’] = $price;
}
return $params;
}, 10, 2 );

{{/gist}}