mgibbs189

{{gist file=”test.js” lang=”javascript”}}
<script>

// This goes into your template file, below your ACF lookup code

(function($) {
$(document).on(‘facetwp-refresh’, function() {
if (! FWP.loaded) {
var data = <?php echo json_encode( $acf_data ); ?>;
$.each(data, function(facet_name, facet_values) {
FWP.facets[facet_name] = facet_values;
});
}
});
})(jQuery);
</script>
{{/gist}}