Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
htdat committed Dec 14, 2023
1 parent fc35450 commit 25d96a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions client/order/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { getConfig } from 'utils/order';
import { isAwaitingResponse, isUnderReview } from 'wcpay/disputes/utils';
import RefundConfirmationModal from './refund-confirm-modal';
import CancelConfirmationModal from './cancel-confirm-modal';
import TestModeNotice from './test-mode-notice';
import DisputedOrderNoticeHandler from 'wcpay/components/disputed-order-notice';
import TestModeNotice from 'wcpay/order/test-mode-notice';

function disableWooOrderRefundButton( disputeStatus ) {
const refundButton = document.querySelector( 'button.refund-items' );
Expand Down Expand Up @@ -160,7 +160,7 @@ jQuery( function ( $ ) {
'#wcpay-order-payment-details-container'
);

// If the orderDetailContainer doesn't exist (WC < 7.9), or the charge ID isn't present, don't render the notice.
// If the container doesn't exist (WC < 7.9), or the charge ID isn't present, don't render the notice.
if ( ! container ) {
return;
}
Expand Down
26 changes: 14 additions & 12 deletions client/order/test-mode-notice/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@ const TestModeNotice = () => {
'WooPayments was in test mode when this order was placed.',
'woocommerce-payments'
) }
{ createInterpolateElement(
__(
' <a>Learn more about test mode</a>',
'woocommerce-payments'
),
{
a: (
// createInterpolateElement is incompatible with this eslint rule as the <a> is decoupled from content.
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a href="https://woo.com/document/woopayments/testing-and-troubleshooting/testing/" />

{ ' ' +
createInterpolateElement(
__(
'<a>Learn more about test mode</a>',
'woocommerce-payments'
),
}
) }
{
a: (
// createInterpolateElement is incompatible with this eslint rule as the <a> is decoupled from content.
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a href="https://woo.com/document/woopayments/testing-and-troubleshooting/testing/" />
),
}
) }
</InlineNotice>
);
};
Expand Down

0 comments on commit 25d96a5

Please sign in to comment.