Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust search_template type and initial value + move save to end of sync #2645

Merged
merged 1 commit into from
Mar 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions includes/classes/Feature/InstantResults/InstantResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class InstantResults extends Feature {
/**
* Elasticsearch query template.
*
* @var array
* @var string
*/
protected $search_template = [];
protected $search_template = '';

/**
* Feature settings
Expand Down Expand Up @@ -220,9 +220,8 @@ public function setup() {
add_filter( 'ep_formatted_args', [ $this, 'maybe_apply_aggs_args' ], 10, 3 );
add_filter( 'ep_post_mapping', [ $this, 'add_mapping_properties' ] );
add_filter( 'ep_post_sync_args', [ $this, 'add_post_sync_args' ], 10, 2 );
add_filter( 'ep_pre_dashboard_index', [ $this, 'epio_save_search_template' ] );
add_filter( 'ep_after_sync_index', [ $this, 'epio_save_search_template' ] );
add_filter( 'ep_saved_weighting_configuration', [ $this, 'epio_save_search_template' ] );
add_filter( 'ep_wp_cli_pre_index', [ $this, 'epio_save_search_template' ] );
add_action( 'pre_get_posts', [ $this, 'maybe_apply_product_visibility' ] );
add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_frontend_assets' ] );
add_action( 'wp_footer', [ $this, 'render' ] );
Expand Down