Skip to content

Commit

Permalink
Show "postal code check" label based on store country (#9952)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcosta99 authored Dec 20, 2024
1 parent 3794508 commit f6010a4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-9896-postal-code-label
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Localize postal code check label based on country.
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ exports[`Order details page should match the snapshot - Charge without payment i
<h4
class="payment-method-detail__label"
>
Zip check
Postal code check
</h4>
<p
class="payment-method-detail__value"
Expand Down
5 changes: 4 additions & 1 deletion client/payment-details/payment-method/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ const CardDetails = ( { charge = {}, isLoading } ) => {

<Detail
isLoading={ isLoading }
label={ __( 'Zip check', 'woocommerce-payments' ) }
label={
/* translators: Label for results of a postal code (ZIP code, in US) check performed by a credit card issuer. */
__( 'Postal code check', 'woocommerce-payments' )
}
>
<Check checked={ postalCodeCheck } />
</Detail>
Expand Down
4 changes: 2 additions & 2 deletions client/payment-details/test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ exports[`Payment details page should match the snapshot - Charge query param 1`]
aria-busy="true"
class="is-loadable-placeholder is-block"
>
Zip check
Postal code check
</span>
</h4>
<p
Expand Down Expand Up @@ -1144,7 +1144,7 @@ exports[`Payment details page should match the snapshot - Payment Intent query p
<h4
class="payment-method-detail__label"
>
Zip check
Postal code check
</h4>
<p
class="payment-method-detail__value"
Expand Down
4 changes: 4 additions & 0 deletions client/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
font-weight: normal;
line-height: 20px;
padding: 4px 0;

@media screen and ( max-width: 470px ) {
flex: 0 0 40%;
}
}

&__value {
Expand Down

0 comments on commit f6010a4

Please sign in to comment.