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

Prevent Shortcodes using Elasticsearch #3362

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

burhandodhy
Copy link
Contributor

Description of the Change

This PR adds the additional check that prevents simple shortcode to use the ES

Closes #

How to test the Change

Add the shortcode and see that it doesn't request ES

function ep_test_product_query() {
  $query = new \WP_Query( array(
    'post_type' => 'product',
  ) );

  return esc_html( 'This should not use Elasticseach.' );
}
add_shortcode( 'ep_test_product_query', __NAMESPACE__ . '\ep_test_product_query' );

Changelog Entry

Fixed - Restrict shortcode using the EP

Credits

Props @burhandodhy @felipeelia

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@burhandodhy burhandodhy marked this pull request as ready for review March 2, 2023 16:27
@burhandodhy burhandodhy added this to the 4.5.0 milestone Mar 2, 2023
@felipeelia felipeelia merged commit 73df90f into develop Mar 3, 2023
@felipeelia felipeelia deleted the prevent-shortcode-using-elasticsearch branch March 3, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants