-
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 badge to Classic Checkout, Pay for Order, and Add Payment Method #9495
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: +454 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
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.
|
||
if ( is_checkout() || is_add_payment_method_page() ) { | ||
if ( WC_Payments::mode()->is_test() ) { | ||
$test_mode_badge = '<span class="test-mode badge">Test Mode</span>'; |
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.
We'll need to use the __()
i18n wrapper, here
Updated to have i18n wrapper, added 8px spacing in 7b273a6 .
Re-assigning for internal review, as discussed in team meeting. |
@danielmx-dev @frosso FYI paJDYF-foh-p2#comment-26617 |
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.
… is not enough space
There are some themes that do not hide the radio button like Storefront does (e.g. twenty twenty-four), which was causing issues with the layout. I have updated the styles to make sure the styles look good in that scenario. Since the payment methods other than card won't use the badge, I won't apply any of the new complex styles on them, to keep things simpler. |
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.
Fixes #9487
Changes proposed in this Pull Request
Testing Instructions - Prerequisites
Testing Instructions - Checkout
Testing Instructions - Add Payment Method
Testing Instructions - Pay for order
Testing Instructions - Regression
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