diff --git a/source/js/algolia-index-js-searchpage.js b/source/js/algolia-index-js-searchpage.js index 22b2090..e71b92e 100644 --- a/source/js/algolia-index-js-searchpage.js +++ b/source/js/algolia-index-js-searchpage.js @@ -8,6 +8,7 @@ document.addEventListener('DOMContentLoaded', function() { const searchClient = algoliasearch( algoliaSearchData.applicationId, algoliaSearchData.publicApiKey, + {...algoliaSearchData.clientConfig} ); const search = instantsearch({ diff --git a/source/php/App.php b/source/php/App.php index 8eec103..dae2484 100644 --- a/source/php/App.php +++ b/source/php/App.php @@ -76,6 +76,7 @@ public function enqueueScripts() 'applicationId' => \AlgoliaIndex\Helper\Options::applicationId(), 'indexName' => \AlgoliaIndex\Helper\Options::indexName(), 'searchQuery' => get_search_query(), + 'clientConfig' => apply_filters('AlgoliaIndex/ClientConfig', []), ]); //UI settings