Fix no email report on product filter #35971
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
Make sure we add a
distinctto the totals query so duplicate order id's are not included.This is possible because of the left join used for the included product filter.
Closes #32220
How to test the changes in this Pull Request:
trunkrunon each item to finish it.Downloadwithin the table. Notice how it shows a notice that the report will be emailed to you (but if you install the Email log plugin you will notice that won't happen). Technically it should only email reports if the order size is larger then the page size, so in this case you can see it's a bug.Downloadagain, notice how it does allow you to download it right away.Downloadand notice how it shows the popup to immediately download the reports.wc-analytics/reports/orders?request and check if theX-WP-Totalresponse header returns the correct order number ( it will return a bigger number ontrunk)Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY: