<?php
/** return custom data in the json facet returns on refresh
** access with FWP.settings.my_data in JS
*/
add_filter( 'facetwp_render_output', function( $output, $params ) {
$output['settings']['my_data'] = 'some data';
return $output;
}, 10, 2 );