FacetWP – index slider values for EU-based numbers

mgibbs189

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

function fwp_index_eu_numbers( $params, $class ) {
$facet = FWP()->helper->get_facet_by_name( $params[‘facet_name’] );
if ( ‘slider’ == $facet[‘type’] ) {
$value = str_replace( ‘,’, ‘.’, $params[‘facet_value’] );
$params[‘facet_value’] = $value;
$params[‘facet_display_value’] = $value;
}
return $params;
}

add_filter( ‘facetwp_index_row’, ‘fwp_index_eu_numbers’, 10, 2 );
{{/gist}}