Skip to content

Commit

Permalink
Rendering Test Model badge only for Credit Card (#9514)
Browse files Browse the repository at this point in the history
Co-authored-by: Samir Merchant <[email protected]>
  • Loading branch information
2 people authored and frosso committed Oct 3, 2024
1 parent ac6d8f7 commit 1399662
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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 && (
{ isCreditCard && isTestMode && (
<span className="test-mode badge">
{ __( 'Test Mode', 'woocommerce-payments' ) }
</span>
Expand Down

0 comments on commit 1399662

Please sign in to comment.