Skip to content
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

Rendering Test Model badge only for Credit Card #9514

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/fix-test-mode-badge-credit-card
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Rendering Test Model badge only for Credit Card
4 changes: 3 additions & 1 deletion client/checkout/blocks/payment-method-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ export default ( {
window.wcBlocksCheckoutData?.storeCountry ||
'US';

const isCreditCard = upeName === 'card';

return (
<>
<div className="payment-method-label">
<span className="payment-method-label__label">
{ upeConfig.title }
</span>
{ isTestMode && (
{ isTestMode && isCreditCard && (
gpressutto5 marked this conversation as resolved.
Show resolved Hide resolved
<span className="test-mode badge">
{ __( 'Test Mode', 'woocommerce-payments' ) }
</span>
Expand Down
Loading