By default, the WordPress REST API doesn’t pass along authentication data.

If your FacetWP template depends on the current logged-in user, you’ll run into issues when an AJAX refresh is triggered.

Fortunately, there’s an easy workaround: add the following code to your (child) theme’s functions.php:

  Please note that caching may interfere with the NONCE,
  causing ajax requests to fail. Please DISABLE CACHING for facet pages,
  or set the cache expiration to < 12 hours!

add_action( 'wp_footer', function() {
(function($) {
  $(function() {
    FWP.hooks.addFilter('facetwp/ajax_settings', function(settings) {
      settings.headers = {
        'X-WP-Nonce': FWP_JSON.nonce
      return settings;
}, 100 );

See also