Code used for facetWP reload page loop

<?php
// Forces FacetWP to do a full page refresh upon any facet interaction.  
// Turns the AJAX reload into a regular page refresh.
// NOT recommended unless you have very specific reasons to.

add_action( 'facetwp_scripts', function() {
  ?>
  <script>
    (function($) {
      $(document).on('facetwp-refresh', function() {
        if (FWP.loaded) { // after the initial pageload
          FWP.parseFacets(); // load the values
          FWP.setHash(); // set the new URL
          location.reload();
          return false;
        }
      });
    })(jQuery);
  </script>

  <?php
}, 100 );