FacetWP – index EDD FES (Front End Submissions) multi-select values

mgibbs189

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

function index_EDD_FES_multiselect( $params, $class ) {
if ( ‘product_style’ == $params[‘facet_name’] ) {
$choices = explode( ‘| ‘, $params[‘facet_display_value’] );
foreach ( $choices as $choice ) {
$params[‘facet_value’] = $choice;
$params[‘facet_display_value’] = $choice;
$class->insert( $params );
}
return false;
}
return $params;
}

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