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
Remove accidental count call within an is_array check #45939
Conversation
Hi @asumaran, @woocommerce/mothra Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
1 similar comment
Hi @asumaran, @woocommerce/mothra Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Test Results SummaryCommit SHA: b7c6b39
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
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.
I can confirm the bug is there and can see the error is gone after applying the changes from this PR.
Before | After |
---|---|
I must have forgot to test with variable products. Sorry about that.
LGTM! Thanks for fixing it @louwie17.
Remove accidental count call within an is_array check that always renders false
* Remove accidental count call within an is_array check (#45939) Remove accidental count call within an is_array check that always renders false * Prep for cherry pick 45939 --------- Co-authored-by: louwie17 <lourensschep@gmail.com> Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Remove accidental count call within an is_array check that always renders false
* Remove accidental count call within an is_array check (#45939) Remove accidental count call within an is_array check that always renders false * Prep for cherry pick 45939 --------- Co-authored-by: louwie17 <lourensschep@gmail.com> Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
Fixes: #45911
This is a fix that was introduced by this PR #43233, where a count call was accidentally added within an
is_array
call. Meaning that it would always render false.This fixes an issue in the Analytics products page when filtering by a selected product, in which case the graph doesn't show up and it shows an error ( see issue ).
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Changelog entry
Significance
Type
Message
Comment