Skip to content

Commit

Permalink
PLANET-7192 Enable elasticpress search query on admin ajax request (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarsdeshmukh authored Dec 1, 2023
1 parent 07e7ac5 commit 83e970f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ protected function initialize(): void
*/
public static function add_general_filters(): void
{
// Allow ajax search.
add_filter(
'ep_ajax_wp_query_integration',
function () {
return true;
},
10
);

// Call apply filters to catch issue in WPML's ElasticPress integration, which uses the wrong filter name.
add_filter(
'ep_formatted_args',
Expand Down

0 comments on commit 83e970f

Please sign in to comment.