Skip to content

Commit

Permalink
update docs links to correct urls for disputes vs. inquiries
Browse files Browse the repository at this point in the history
  • Loading branch information
Rua Haszard committed Sep 25, 2023
1 parent fd803e1 commit 9bc6046
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions client/payment-details/dispute-details/dispute-notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,22 @@ const DisputeNotice: React.FC< DisputeNoticeProps > = ( {
/* translators: <a> link to dispute documentation. %s is the clients claim for the dispute, eg "The cardholder claims this is an unrecognized charge." */
let noticeText = __(
'<strong>%s</strong> Challenge the dispute if you believe the claim is invalid, ' +
'or accept to forfeit the funds and pay the dispute fee. ' +
'Non-response will result in an automatic loss. <a>Learn more about responding to disputes</a>',
'or accept to forfeit the funds and pay the dispute fee. ' +
'Non-response will result in an automatic loss. <a>Learn more about responding to disputes</a>',
'woocommerce-payments'
);
let learnMoreDocsUrl = 'https://woocommerce.com/document/woopayments/fraud-and-disputes/managing-disputes/#section-3';
let learnMoreDocsUrl =
'https://woocommerce.com/document/woopayments/fraud-and-disputes/managing-disputes/#responding';

if ( isInquiry( dispute ) ) {
/* translators: <a> link to dispute inquiry documentation. %s is the clients claim for the dispute, eg "The cardholder claims this is an unrecognized charge." */
noticeText = __(
'<strong>%s</strong> You can challenge their claim if you believe it’s invalid. ' +
'Not responding will result in an automatic loss. <a>Learn more</a>',
'Not responding will result in an automatic loss. <a>Learn more about payment inquiries</a>',
'woocommerce-payments'
)
);
learnMoreDocsUrl =
'https://woocommerce.com/document/woopayments/fraud-and-disputes/managing-disputes/#inquiries';
}

return (
Expand All @@ -57,17 +60,20 @@ const DisputeNotice: React.FC< DisputeNoticeProps > = ( {
className="dispute-notice"
isDismissible={ false }
>
{ createInterpolateElement( sprintf( noticeText, shopperDisputeReason ), {
a: (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
target="_blank"
rel="noopener noreferrer"
href={ learnMoreDocsUrl }
/>
),
strong: <strong />,
} ) }
{ createInterpolateElement(
sprintf( noticeText, shopperDisputeReason ),
{
a: (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
target="_blank"
rel="noopener noreferrer"
href={ learnMoreDocsUrl }
/>
),
strong: <strong />,
}
) }
</InlineNotice>
);
};
Expand Down

0 comments on commit 9bc6046

Please sign in to comment.