Skip to content

Commit

Permalink
Added helpful hint in test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessy P committed Dec 14, 2023
1 parent 546d117 commit 5b12897
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions client/settings/support-phone-input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ const SupportPhoneInput = ( { setInputVallid } ) => {
}
}, [ supportPhoneError, setInputVallid ] );

let labelText = __( 'Support phone number', 'woocommerce-payments' );
if ( isDevModeEnabled ) {
labelText += __(
' ( Use +1 000-000-0000 in test mode. )',
'woocommerce-payments'
);
}
return (
<>
{ supportPhoneError && (
Expand All @@ -63,18 +70,15 @@ const SupportPhoneInput = ( { setInputVallid } ) => {
'This may be visible on receipts, invoices, and automated emails from your store.',
'woocommerce-payments'
) }
label={ __( 'Support phone number', 'woocommerce-payments' ) }
label={ labelText }
id="account-business-support-phone-input"
>
<PhoneNumberInput
onValueChange={ setSupportPhone }
value={ supportPhone }
onValidationChange={ setPhoneValidity }
inputProps={ {
ariaLabel: __(
'Support phone number',
'woocommerce-payments'
),
ariaLabel: labelText,
} }
/>
</BaseControl>
Expand Down

0 comments on commit 5b12897

Please sign in to comment.