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
Dont render attribution metabox for non-supported order types. #44680
Conversation
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: |
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.
The code looks good!
Disclaimer: I have not tested it.
Test Results SummaryCommit SHA: 25ee027
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. |
Hey @vedanshujain, thank you for the PR. I followed the test instructions. It is failing this test:
Can you please check? With PR: Without PR: |
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.
Thank you, @vedanshujain, for the changes. I tested the PR by following the test instructions and they test well.
* Dont render attribution metabox for non-supported order types. * Use a screen check instead of order type check for better compat. * phpcs fix * Remove unnecessary call.
* Dont render attribution metabox for non-supported order types. (#44680) * Dont render attribution metabox for non-supported order types. * Use a screen check instead of order type check for better compat. * phpcs fix * Remove unnecessary call. * Prep for cherry pick 44680 --------- Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com> Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* Dont render attribution metabox for non-supported order types. * Use a screen check instead of order type check for better compat. * phpcs fix * Remove unnecessary call.
* Dont render attribution metabox for non-supported order types. (#44680) * Dont render attribution metabox for non-supported order types. * Use a screen check instead of order type check for better compat. * phpcs fix * Remove unnecessary call. * Prep for cherry pick 44680 --------- Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com> Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
Bail early if the order type is anything other than the
Automattic\WooCommerce\Admin\Overrides\Order
which provides the necessary method for rendering this metabox.Closes #44677
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
This fix can be tested on any order type other than the core order type that renders their own admin page. For example, we can test with subscriptions.
Edit: Please also repeat these testing instructions for both HPOS and post data stores. Note that if WooCommcerce analytics is disabled then the customer history stats will not be displayed.
Additionally, we need to test that the order attribution meta box is indeed displayed for normal orders.
Changelog entry
Significance
Type
Message
Comment