-
Notifications
You must be signed in to change notification settings - Fork 313
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
Limit WooCommerce integration with ability to allow it #2914
Conversation
@MARQAS before we merge this one we will need a list of real scenarios where we would expect the feature to integrate or not with Elasticsearch. Then that will need to become proper tests. Can you please work on that? Thanks. |
@MARQAS I've created a new sheet in our doc with a format I think will make things easier for us to understand. Can you please let me know when you have that completely filled? Feel free to add any new lines/scenarios you think I missed. |
*/ | ||
if ( defined( 'WC_API_REQUEST' ) && WC_API_REQUEST ) { | ||
return false; | ||
if ( method_exists( $query, 'is_search' ) && ! $query->is_search() && empty( $query->query_vars['s'] ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] The is_search()
method is available since WP 3.1.0. Is there any reason why we are checking if it exists?
* @hook ep_woocommerce_integration | ||
* @param {bool} $allow True to allow ep integration | ||
* @param {WP_Query} $query WP Query to evaluate | ||
* @since 4.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to update this to 4.5.0
Closing this in favor of (the already merged) #3259 |
Description of the Change
Filter to allow WooCommerce. It will limit the usage of WooCommerce integration to the places where it is actually needed.
Closes #2809
How to test the Change
Changelog Entry
Credits
Props @MARQAS
Checklist: