ElasticPress icon indicating copy to clipboard operation
ElasticPress copied to clipboard

Limit WooCommerce integration

Open felipeelia opened this issue 3 years ago • 0 comments

Is your enhancement related to a problem? Please describe.

Currently, the translate_args and the should_integrate_with_query methods are too broad. For example, running:

		$posts = get_posts(
			[
				'post_type' => 'product',
				'post__in'  => [ 1, 2, 3 ],
			]
		);

Will add ep_integrate to the query. If the theme has 3 or 4 calls like that, it would result in 3 or 4 external requests, most likely making performance worst rather than helping it.

Describe the solution you'd like

We need to limit that integration to requests that really make sense, obviously allowing users to overwrite that if needed.

felipeelia avatar May 31 '22 12:05 felipeelia