-
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
Adds support for searching shop_subscriptions #2867 #3029
Adds support for searching shop_subscriptions #2867 #3029
Conversation
@felipeelia Any insight on what would be neeed to get this reviewed/merged? |
@felipeelia Could you elaborate on what "needs discussion" means, so I can do the legwork to provide context? Or is it just an internal flag for the 10Up core team? |
Hey @ecaron, it is just a flag we use to bring it to our internal syncs. I'll get back to you here once we have anything new to share. Thanks for reaching out! |
Hey @ecaron, we've talked internally and as this is not strictly related to WooCommerce's core, the best place for it is actually as a subfeature in ElasticPress Labs (there we maintain compatibility with Co-Authors Plus, for example.) To have that added to EP Labs, the code will be a bit bigger but if you want to give that a try, it would be great! Otherwise, we will try to address it as soon as possible. Thanks! |
I understand. I'll create a PR for this as a subfeature to ElasticPress Labs. I started with this PR, but my goal is to have this move to a PR there by EOD. I'll close this once that PR is opened. |
@felipeelia, to help me understand the direction that you're looking to go and likely to approve, are you suggesting: Option 1 - Isolating everything to ElasticPressLabs
Option 2 - Tweaks to ElasticPress to make hooking from EPL easier
Option 99 - If the above aren't pleasant ideas for your vision of EPL's futureSince this PR only depends on the MIT-licensed Automattic woocommerce-subscription-core, it could be merged in as-is. That repo shows there are other paid plugins that depend on this core, beyond the 2 paid Automattic plugins, so this would inherently bring support for those plugins into ElasticPress core. |
This PR has been updated to include the hooks and filters mentioned in the aforementioned option 2. PR has been submitted at 10up/ElasticPressLabs#44 to leverage them. |
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.
Thanks for the code @ecaron. I've listed some changes we will need before merging this one but nothing major.
@felipeelia The "E2E Test / Cypress - Local" failure seems unrelated to this PR (failing in #3129 and #3068). Do you see this being included in the 4.4.0 work covered under #3129, or should I update the PR to have it target 4.5.0? |
Hey @ecaron, I'm also keeping an eye on those tests :) . And this will be part of 4.4.0, no need to change anything (I'm just rerunning the tests to see if they unstuck now.) Thanks! |
@felipeelia PROBLEM |
@amanfredini76 there is no point in commenting on a Pull Request closed in 2022, let's please keep your problem isolated in that issue. |
Description of the Change
This change expands the admin search functionality to work on shop_subscriptions just like it does on shop_orders today, expanding on the WooCommerce subscription-core functionality.
The behavior is just like
shop_order
, where it detects if the searched post_type isshop_subscription
, and then it hijacks the behavior to route the search through Elasticsearch rather than WordPress' database.Closes #2867
How to test the Change
Changelog Entry
Credits
Props @ecaron
Checklist: