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

Clicking on coupon usage, should search by coupon ID, not name #13568

Closed
glagonikas opened this issue Mar 13, 2017 · 2 comments
Closed

Clicking on coupon usage, should search by coupon ID, not name #13568

glagonikas opened this issue Mar 13, 2017 · 2 comments
Labels
status: won't fix The issue won’t be fixed.

Comments

@glagonikas
Copy link
Contributor

EXPLANATION OF THE ISSUE

On the coupon list page, when you click on the number of uses of the coupon, it takes you to a page where all orders of this coupon are shown. This works fine for many web stores when they have just a few coupons or they have distinct name, however it's not very accurate as it's not searching for the exact coupon name.

To be more specific, take the following two coupons for example, Coupon10 offering 10% discount and Coupon100 offering 100% discount. When you click on the coupon usage for Coupon10, you will get all the orders with Coupon10, but also the orders from Coupon100.

This should ideally be updated so the code will search by coupon ID instead.

STEPS TO REPRODUCE THE ISSUE

  1. Create a coupon called Coupon10
  2. Create a coupon called Coupon100
  3. Create an order for each
  4. Go to the Coupons list page at https://www.gruum.com/wp-admin/edit.php?post_type=shop_coupon
  5. Click on the usage for Coupon10. It shows 2 orders, instead of just one.
@mikejolley
Copy link
Member

There is no formal relationship between orders and coupons to do this type of filtering. I've also just noticed this filter is no longer functional in master - running that type of search query on all post meta fields was previously done, but no longer due to the performance issues it causes. The search is a hacky way of doing it.

This link needs to be removed until a relationship is introduced.

@mikejolley
Copy link
Member

Logged an issue for that. This is a won't fix item until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: won't fix The issue won’t be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants