From e70bd53359f52e7ed047f373fb6680fcb88d6918 Mon Sep 17 00:00:00 2001 From: Adam Heckler <5512652+aheckler@users.noreply.github.com> Date: Thu, 19 Dec 2024 07:04:38 -0500 Subject: [PATCH 1/3] Use "currency conversion fee" Fixes 9996 --- .../fix-9996-currency-conversion-fee-phrasing | 4 +++ client/payment-details/timeline/map-events.js | 4 +-- .../test/__snapshots__/map-events.js.snap | 30 +++++++++---------- client/utils/account-fees.tsx | 2 +- .../test/__snapshots__/account-fees.tsx.snap | 4 +-- .../class-wc-payments-captured-event-note.php | 4 +-- .../fixtures/captured-payments/discount.json | 2 +- .../captured-payments/foreign-card.json | 2 +- .../captured-payments/fx-decimal.json | 2 +- .../captured-payments/fx-partial-capture.json | 2 +- .../captured-payments/fx-with-capped-fee.json | 2 +- tests/fixtures/captured-payments/fx.json | 2 +- .../captured-payments/jpy-payment.json | 2 +- .../captured-payments/subscription.json | 2 +- 14 files changed, 34 insertions(+), 30 deletions(-) create mode 100644 changelog/fix-9996-currency-conversion-fee-phrasing diff --git a/changelog/fix-9996-currency-conversion-fee-phrasing b/changelog/fix-9996-currency-conversion-fee-phrasing new file mode 100644 index 00000000000..aa7f841d91d --- /dev/null +++ b/changelog/fix-9996-currency-conversion-fee-phrasing @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Use "currency conversion fee", not "foreign exchange fee" diff --git a/client/payment-details/timeline/map-events.js b/client/payment-details/timeline/map-events.js index b76f659ac63..7e5570ce8ce 100644 --- a/client/payment-details/timeline/map-events.js +++ b/client/payment-details/timeline/map-events.js @@ -410,12 +410,12 @@ export const feeBreakdown = ( event ) => { fixedRate !== 0 ? __( /* translators: %1$s% is the fee percentage and %2$s is the fixed rate */ - 'Foreign exchange fee: %1$s%% + %2$s', + 'Currency conversion fee: %1$s%% + %2$s', 'woocommerce-payments' ) : __( /* translators: %1$s% is the fee percentage */ - 'Foreign exchange fee: %1$s%%', + 'Currency conversion fee: %1$s%%', 'woocommerce-payments' ), 'additional-wcpay-subscription': diff --git a/client/payment-details/timeline/test/__snapshots__/map-events.js.snap b/client/payment-details/timeline/test/__snapshots__/map-events.js.snap index 4126cb1ff38..39feb70016c 100644 --- a/client/payment-details/timeline/test/__snapshots__/map-events.js.snap +++ b/client/payment-details/timeline/test/__snapshots__/map-events.js.snap @@ -12,7 +12,7 @@ exports[`mapTimelineEvents Multi-Currency events formats captured events with fe "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $20.97 USD was added to your + $20.97 USD was added to your @@ -50,7 +50,7 @@ exports[`mapTimelineEvents Multi-Currency events formats captured events without "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $20.97 USD was added to your + $20.97 USD was added to your @@ -120,7 +120,7 @@ exports[`mapTimelineEvents Multi-Currency events formats dispute_won events 1`] ], "date": 2020-04-04T16:20:50.000Z, "headline": - $44.99 USD was added to your + $44.99 USD was added to your @@ -372,7 +372,7 @@ exports[`mapTimelineEvents single currency events formats captured events with f "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your @@ -389,7 +389,7 @@ exports[`mapTimelineEvents single currency events formats captured events with f
    - +
  • Base fee: 1.4% + £0.20
  • @@ -397,7 +397,7 @@ exports[`mapTimelineEvents single currency events formats captured events with f International card fee: 1.5%
  • - Foreign exchange fee: 2% + Currency conversion fee: 2%
  • Discount @@ -412,7 +412,7 @@ exports[`mapTimelineEvents single currency events formats captured events with f
- + , "Net payout: $59.50 USD", ], @@ -437,7 +437,7 @@ exports[`mapTimelineEvents single currency events formats captured events with j "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your @@ -475,7 +475,7 @@ exports[`mapTimelineEvents single currency events formats captured events withou "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your @@ -564,7 +564,7 @@ exports[`mapTimelineEvents single currency events formats dispute_won events 1`] ], "date": 2020-04-04T16:20:50.000Z, "headline": - $115.00 USD was added to your + $115.00 USD was added to your @@ -590,7 +590,7 @@ exports[`mapTimelineEvents single currency events formats financing paydown even { "body": [ - Loan repayment: + Loan repayment: @@ -673,7 +673,7 @@ exports[`mapTimelineEvents single currency events in person payments - tap to pa "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $19.19 USD was added to your + $19.19 USD was added to your @@ -690,14 +690,14 @@ exports[`mapTimelineEvents single currency events in person payments - tap to pa
    - +
  • Base fee: 2.6% + $0.10
  • Tap to pay transaction fee: 0% + $0.10
  • - +
, "Net payout: $19.19 USD", ], @@ -722,7 +722,7 @@ exports[`mapTimelineEvents single currency events should not render fee breakup "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your diff --git a/client/utils/account-fees.tsx b/client/utils/account-fees.tsx index 711d3d337ed..a1c8056f78d 100644 --- a/client/utils/account-fees.tsx +++ b/client/utils/account-fees.tsx @@ -166,7 +166,7 @@ export const formatMethodFeesTooltip = ( ) } { hasFees( accountFees.fx ) ? (
-
Foreign exchange fee
+
Currency conversion fee
{ getFeeDescriptionString( accountFees.fx ) }
) : ( diff --git a/client/utils/test/__snapshots__/account-fees.tsx.snap b/client/utils/test/__snapshots__/account-fees.tsx.snap index 89321bc7582..d92aa6ae54e 100644 --- a/client/utils/test/__snapshots__/account-fees.tsx.snap +++ b/client/utils/test/__snapshots__/account-fees.tsx.snap @@ -23,7 +23,7 @@ exports[`Account fees utility functions formatMethodFeesTooltip() displays base
- Foreign exchange fee + Currency conversion fee
1% @@ -102,7 +102,7 @@ exports[`Account fees utility functions formatMethodFeesTooltip() displays base
- Foreign exchange fee + Currency conversion fee
1% diff --git a/includes/class-wc-payments-captured-event-note.php b/includes/class-wc-payments-captured-event-note.php index 10c48567952..07e902d8632 100644 --- a/includes/class-wc-payments-captured-event-note.php +++ b/includes/class-wc-payments-captured-event-note.php @@ -327,9 +327,9 @@ private function fee_label_mapping( int $fixed_rate, bool $is_capped ) { $res['additional-fx'] = 0 !== $fixed_rate /* translators: %1$s% is the fee percentage and %2$s is the fixed rate */ - ? __( 'Foreign exchange fee: %1$s%% + %2$s', 'woocommerce-payments' ) + ? __( 'Currency conversion fee: %1$s%% + %2$s', 'woocommerce-payments' ) /* translators: %1$s% is the fee percentage */ - : __( 'Foreign exchange fee: %1$s%%', 'woocommerce-payments' ); + : __( 'Currency conversion fee: %1$s%%', 'woocommerce-payments' ); $res['additional-wcpay-subscription'] = 0 !== $fixed_rate /* translators: %1$s% is the fee percentage and %2$s is the fixed rate */ diff --git a/tests/fixtures/captured-payments/discount.json b/tests/fixtures/captured-payments/discount.json index 2fa6a911d74..5bf6f936c45 100644 --- a/tests/fixtures/captured-payments/discount.json +++ b/tests/fixtures/captured-payments/discount.json @@ -60,7 +60,7 @@ "feeBreakdown": { "base": "Base fee: 2.9% + $0.30", "additional-international": "International card fee: 1%", - "additional-fx": "Foreign exchange fee: 1%", + "additional-fx": "Currency conversion fee: 1%", "discount": { "label": "Discount", "variable": "Variable fee: -4.9%", diff --git a/tests/fixtures/captured-payments/foreign-card.json b/tests/fixtures/captured-payments/foreign-card.json index 234878b2372..df45c326d62 100644 --- a/tests/fixtures/captured-payments/foreign-card.json +++ b/tests/fixtures/captured-payments/foreign-card.json @@ -53,7 +53,7 @@ "feeBreakdown": { "base": "Base fee: 2.9% + $0.30", "additional-international": "International card fee: 1%", - "additional-fx": "Foreign exchange fee: 1%" + "additional-fx": "Currency conversion fee: 1%" }, "netString": "Net payout: $95.47 USD" } diff --git a/tests/fixtures/captured-payments/fx-decimal.json b/tests/fixtures/captured-payments/fx-decimal.json index b95e9318c84..2f065036122 100644 --- a/tests/fixtures/captured-payments/fx-decimal.json +++ b/tests/fixtures/captured-payments/fx-decimal.json @@ -45,7 +45,7 @@ "feeString": "Fee (3.9% + $0.30): -$4.39", "feeBreakdown": { "base": "Base fee: 2.9% + $0.30", - "additional-fx": "Foreign exchange fee: 1%" + "additional-fx": "Currency conversion fee: 1%" }, "netString": "Net payout: $100.65 USD" } diff --git a/tests/fixtures/captured-payments/fx-partial-capture.json b/tests/fixtures/captured-payments/fx-partial-capture.json index f10ff7aa9e9..691390d4852 100644 --- a/tests/fixtures/captured-payments/fx-partial-capture.json +++ b/tests/fixtures/captured-payments/fx-partial-capture.json @@ -57,7 +57,7 @@ "feeString": "Fee (3.51% + £0.21): -$0.88", "feeBreakdown": { "base": "Base fee: 2.9% + $0.30", - "additional-fx": "Foreign exchange fee: 1%", + "additional-fx": "Currency conversion fee: 1%", "discount": { "label": "Discount", "variable": "Variable fee: -0.39%", diff --git a/tests/fixtures/captured-payments/fx-with-capped-fee.json b/tests/fixtures/captured-payments/fx-with-capped-fee.json index 8c1b602a3eb..4c31a8435d7 100644 --- a/tests/fixtures/captured-payments/fx-with-capped-fee.json +++ b/tests/fixtures/captured-payments/fx-with-capped-fee.json @@ -55,7 +55,7 @@ "feeBreakdown": { "base": "Base fee: capped at $6.00", "additional-international": "International card fee: 1.5%", - "additional-fx": "Foreign exchange fee: 1%" + "additional-fx": "Currency conversion fee: 1%" }, "netString": "Net payout: $971.04 USD" } diff --git a/tests/fixtures/captured-payments/fx.json b/tests/fixtures/captured-payments/fx.json index 8ceee7b7438..f18ca9297ab 100644 --- a/tests/fixtures/captured-payments/fx.json +++ b/tests/fixtures/captured-payments/fx.json @@ -46,7 +46,7 @@ "feeString": "Fee (3.9% + $0.30): -$4.20", "feeBreakdown": { "base": "Base fee: 2.9% + $0.30", - "additional-fx": "Foreign exchange fee: 1%" + "additional-fx": "Currency conversion fee: 1%" }, "netString": "Net payout: $95.84 USD" } diff --git a/tests/fixtures/captured-payments/jpy-payment.json b/tests/fixtures/captured-payments/jpy-payment.json index 6c7a6b3ee05..4b4c6c152c9 100644 --- a/tests/fixtures/captured-payments/jpy-payment.json +++ b/tests/fixtures/captured-payments/jpy-payment.json @@ -57,7 +57,7 @@ "feeBreakdown": { "base": "Base fee: 3.6%", "additional-international": "International card fee: 2%", - "additional-fx": "Foreign exchange fee: 2%" + "additional-fx": "Currency conversion fee: 2%" }, "netString": "Net payout: ¥4,507 JPY" } diff --git a/tests/fixtures/captured-payments/subscription.json b/tests/fixtures/captured-payments/subscription.json index b7312ea0c02..d0e1fe705e4 100644 --- a/tests/fixtures/captured-payments/subscription.json +++ b/tests/fixtures/captured-payments/subscription.json @@ -53,7 +53,7 @@ "feeString": "Fee (4.9% + $0.30): -$3.04", "feeBreakdown": { "base": "Base fee: 2.9% + $0.30", - "additional-fx": "Foreign exchange fee: 1%", + "additional-fx": "Currency conversion fee: 1%", "additional-wcpay-subscription": "Subscription transaction fee: 1%" }, "netString": "Net payout: $52.87 USD" From 581bec7bb9abf46e1143209e04f51c695173c34e Mon Sep 17 00:00:00 2001 From: Nagesh Pai Date: Thu, 19 Dec 2024 19:57:41 +0530 Subject: [PATCH 2/3] Update test snapshot --- .../test/__snapshots__/map-events.js.snap | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/client/payment-details/timeline/test/__snapshots__/map-events.js.snap b/client/payment-details/timeline/test/__snapshots__/map-events.js.snap index 39feb70016c..b229ba674be 100644 --- a/client/payment-details/timeline/test/__snapshots__/map-events.js.snap +++ b/client/payment-details/timeline/test/__snapshots__/map-events.js.snap @@ -12,7 +12,7 @@ exports[`mapTimelineEvents Multi-Currency events formats captured events with fe "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $20.97 USD was added to your + $20.97 USD was added to your @@ -50,7 +50,7 @@ exports[`mapTimelineEvents Multi-Currency events formats captured events without "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $20.97 USD was added to your + $20.97 USD was added to your @@ -120,7 +120,7 @@ exports[`mapTimelineEvents Multi-Currency events formats dispute_won events 1`] ], "date": 2020-04-04T16:20:50.000Z, "headline": - $44.99 USD was added to your + $44.99 USD was added to your @@ -372,7 +372,7 @@ exports[`mapTimelineEvents single currency events formats captured events with f "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your @@ -389,7 +389,7 @@ exports[`mapTimelineEvents single currency events formats captured events with f
    - +
  • Base fee: 1.4% + £0.20
  • @@ -412,7 +412,7 @@ exports[`mapTimelineEvents single currency events formats captured events with f
- + , "Net payout: $59.50 USD", ], @@ -437,7 +437,7 @@ exports[`mapTimelineEvents single currency events formats captured events with j "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your @@ -475,7 +475,7 @@ exports[`mapTimelineEvents single currency events formats captured events withou "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your @@ -564,7 +564,7 @@ exports[`mapTimelineEvents single currency events formats dispute_won events 1`] ], "date": 2020-04-04T16:20:50.000Z, "headline": - $115.00 USD was added to your + $115.00 USD was added to your @@ -590,7 +590,7 @@ exports[`mapTimelineEvents single currency events formats financing paydown even { "body": [ - Loan repayment: + Loan repayment: @@ -673,7 +673,7 @@ exports[`mapTimelineEvents single currency events in person payments - tap to pa "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $19.19 USD was added to your + $19.19 USD was added to your @@ -690,14 +690,14 @@ exports[`mapTimelineEvents single currency events in person payments - tap to pa
    - +
  • Base fee: 2.6% + $0.10
  • Tap to pay transaction fee: 0% + $0.10
  • - +
, "Net payout: $19.19 USD", ], @@ -722,7 +722,7 @@ exports[`mapTimelineEvents single currency events should not render fee breakup "body": [], "date": 2020-04-01T14:37:54.000Z, "headline": - $59.50 USD was added to your + $59.50 USD was added to your From 8576d8aa7b22502e164910bb73e98d8d5a373045 Mon Sep 17 00:00:00 2001 From: Adam Heckler <5512652+aheckler@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:35:28 -0500 Subject: [PATCH 3/3] Update changelog --- changelog/fix-9996-currency-conversion-fee-phrasing | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/fix-9996-currency-conversion-fee-phrasing b/changelog/fix-9996-currency-conversion-fee-phrasing index aa7f841d91d..bdee2cbc00f 100644 --- a/changelog/fix-9996-currency-conversion-fee-phrasing +++ b/changelog/fix-9996-currency-conversion-fee-phrasing @@ -1,4 +1,4 @@ Significance: minor Type: fix -Use "currency conversion fee", not "foreign exchange fee" +Use "currency conversion fee" instead "foreign exchange fee" in payment timeline and various other places.