Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: Change WooPayments "Channel" to "Sales Channel" and other channel names #10437

Merged
merged 7 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/fix-10245-update-texts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: update

Change wording for Sales Channel, Online Store, In-Person, and In-Person (POS)
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ exports[`Order details page should match the snapshot - Charge without payment i
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/payment-details/summary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const composePaymentSummaryItems = ( {
: '–',
},
{
title: __( 'Channel', 'woocommerce-payments' ),
title: __( 'Sales channel', 'woocommerce-payments' ),
content: (
<span>
{ isTapToPay( metadata?.reader_model )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ exports[`PaymentDetailsSummary capture notification and fraud buttons renders ca
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -508,13 +508,13 @@ exports[`PaymentDetailsSummary capture notification and fraud buttons renders th
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -868,13 +868,13 @@ exports[`PaymentDetailsSummary correctly renders a charge 1`] = `
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1179,13 +1179,13 @@ exports[`PaymentDetailsSummary correctly renders when payment intent is missing
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1504,13 +1504,13 @@ exports[`PaymentDetailsSummary order missing notice does not render notice if or
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1829,13 +1829,13 @@ exports[`PaymentDetailsSummary order missing notice renders notice if order miss
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2177,13 +2177,13 @@ exports[`PaymentDetailsSummary renders a charge with subscriptions 1`] = `
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2506,13 +2506,13 @@ exports[`PaymentDetailsSummary renders fully refunded information for a charge 1
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2774,13 +2774,13 @@ exports[`PaymentDetailsSummary renders loading state 1`] = `
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -3078,13 +3078,13 @@ exports[`PaymentDetailsSummary renders partially refunded information for a char
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -3403,7 +3403,7 @@ exports[`PaymentDetailsSummary renders the Tap to Pay channel from metadata 1`]
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
Expand Down Expand Up @@ -3728,13 +3728,13 @@ exports[`PaymentDetailsSummary renders the information of a dispute-reversal cha
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
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 @@ -656,13 +656,13 @@ exports[`Payment details page should match the snapshot - Payment Intent query p
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down
25 changes: 14 additions & 11 deletions client/transactions/filters/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,43 +442,46 @@ export const getAdvancedFilters = (
},
channel: {
labels: {
add: __( 'Channel', 'woocommerce-payments' ),
add: __( 'Sales channel', 'woocommerce-payments' ),
remove: __(
'Remove transaction channel filter',
'Remove transaction sales channel filter',
'woocommerce-payments'
),
rule: __(
'Select a transaction channel filter match',
'Select a transaction sales channel filter match',
'woocommerce-payments'
),
/* translators: A sentence describing a Transaction Channel filter. */
title:
wooCommerceVersion < 7.8
? __(
'{{title}}Channel{{/title}} {{rule /}} {{filter /}}',
'{{title}}Sales channel{{/title}} {{rule /}} {{filter /}}',
'woocommerce-payments'
)
: __(
'<title>Channel</title> <rule /> <filter />',
'<title>Sales channel</title> <rule /> <filter />',
'woocommerce-payments'
),
filter: __(
'Select a transaction channel',
'Select a transaction sales channel',
'woocommerce-payments'
),
},
rules: [
{
value: 'is',
/* translators: Sentence fragment, logical, "Is" refers to searching for transactions matching a chosen transaction channel type. */
label: _x( 'Is', 'Channel', 'woocommerce-payments' ),
/* translators: Sentence fragment, logical, "Is" refers to searching for transactions matching a chosen transaction sales channel type. */
label: _x(
'Is',
'Sales channel',
'woocommerce-payments'
),
},
{
value: 'is_not',
/* translators: Sentence fragment, logical, "Is not" refers to searching for transactions that don\'t match a chosen transaction channel type. */
/* translators: Sentence fragment, logical, "Is not" refers to searching for transactions that don\'t match a chosen transaction sales channel type. */
label: _x(
'Is not',
'Channel',
'Sales channel',
'woocommerce-payments'
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ HTMLOptionsCollection [
<option
value="online"
>
Online
Online store
</option>,
<option
value="in_person"
>
In-Person
</option>,
<option
value="in_person_pos"
>
In-Person (POS)
</option>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding from the P2 discussion is that we would have two broad categories:

  • Online store
  • In-person

Each category would have more specific variations, like child terms in a taxonomy. The variations would be tracked in custom metadata/attribute. For example:

  • Online store
    • credit card
    • paypal
    • afterpay
    • etc
  • In-person
    • woo iOS app IPP
    • woo / stripe card-reader hardware
    • etc

So … I wasn't expecting two separate categories for In-person. I think that's confusing, and doesn't scale – we don't have separate top-level categories for Online store, even though it covers lots of variations.

Copy link
Member Author

@htdat htdat Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agreed with the sentiment here, but actually this dropdown filter option has been missed in this past PR #9802

So it's a compliment for that PR.

]
`;

Expand Down
11 changes: 5 additions & 6 deletions client/transactions/filters/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,26 +356,25 @@ describe( 'Transactions filters', () => {
let ruleSelector: HTMLElement;

beforeEach( () => {
addAdvancedFilter( 'Channel' );
addAdvancedFilter( 'Sales channel' );
ruleSelector = screen.getByRole( 'combobox', {
name: /transaction channel filter/i,
name: /transaction sales channel filter/i,
} );
} );

test( 'should render all types', () => {
const typeSelect = screen.getByRole( 'combobox', {
name: /transaction channel$/i,
name: /transaction sales channel$/i,
} ) as HTMLSelectElement;
expect( typeSelect.options ).toMatchSnapshot();
} );

test( 'should filter by is', () => {
user.selectOptions( ruleSelector, 'is' );

// need to include $ in name, otherwise "Select a transaction type filter" is also matched.
user.selectOptions(
screen.getByRole( 'combobox', {
name: /transaction channel$/i,
name: /transaction sales channel$/i,
} ),
'online'
);
Expand All @@ -390,7 +389,7 @@ describe( 'Transactions filters', () => {
// need to include $ in name, otherwise "Select a transaction type filter" is also matched.
user.selectOptions(
screen.getByRole( 'combobox', {
name: /transaction channel$/i,
name: /transaction sales channel$/i,
} ),
'in_person'
);
Expand Down
4 changes: 2 additions & 2 deletions client/transactions/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ const getColumns = (
},
{
key: 'channel',
label: __( 'Channel', 'woocommerce-payments' ),
screenReaderLabel: __( 'Channel', 'woocommerce-payments' ),
label: __( 'Sales channel', 'woocommerce-payments' ),
screenReaderLabel: __( 'Sales channel', 'woocommerce-payments' ),
required: true,
isLeftAligned: true,
},
Expand Down
Loading
Loading