-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add test mode notice in page order detail. #7898
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +140 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
Note: all test failures are related to Update: also be ready to get reviews. |
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.
- Fix conflicts
Other nitpicks:
- Can add tests for the component to check that the modal displays.
- Can use the key
WCPAY_MODE_META_KEY
instead ofWCPAY_MODE_KEY
for two reasons:
- Follows the pattern already followed inWC_Payments_Order_Service
for other keys
- Jumps out to me easier in lines like
\WCPay\Constants\Order_Mode::TEST === $order->get_meta( WC_Payments_Order_Service::WCPAY_MODE_KEY )
where we have theOrder_Mode
and theWC_Payments::mode()
in addition to the meta_key
# Conflicts: # client/order/index.js # includes/admin/class-wc-payments-admin.php
👋 @jessy-p Thanks for the feedback. I addressed for other comments except this one:
Actually, this is NOT a modal being triggered in a specific event such as |
Fixes #334
Changes proposed in this Pull Request
Use the same foundation of Show active dispute as inline notice in order edit screen #6373 to add a new notice for test mode in the order details. Changes for this in the JS change files, and this PHP code
woocommerce-payments/includes/admin/class-wc-payments-admin.php
Line 737 in 25d96a5
I also use this opportunity to introduce
Order_Mode
constant (enum) class, andWC_Payments_Order_Service::WCPAY_MODE_KEY
. Changes for this is for the rest of PHP files.Testing instructions
Screenshots
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge