Payment task: fix wrong copy in the accordion link (#33662)

* Fix wrong copy in the accordion link for payment task

* Add changelog
This commit is contained in:
Chi-Hsuan Huang 2022-06-30 12:20:23 +08:00 committed by GitHub
parent def11b77d9
commit 2dc3d87e1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View File

@ -248,7 +248,10 @@ export const PaymentGatewaySuggestions = ( { onComplete, query } ) => {
<>
<WCPaySuggestion paymentGateway={ wcPayGateway[ 0 ] } />
<Toggle
heading={ __( 'Other payment methods', 'woocommerce' ) }
heading={ __(
'Other payment providers',
'woocommerce'
) }
onToggle={ trackToggle }
>
{ additionalSection }

View File

@ -287,7 +287,7 @@ describe( 'PaymentGatewaySuggestions', () => {
} );
} );
test( 'should record event correctly when other payment methods is clicked', () => {
test( 'should record event correctly when Other payment providers is clicked', () => {
const onComplete = jest.fn();
const query = {};
useSelect.mockImplementation( () => ( {
@ -305,7 +305,7 @@ describe( 'PaymentGatewaySuggestions', () => {
/>
);
fireEvent.click( screen.getByText( 'Other payment methods' ) );
fireEvent.click( screen.getByText( 'Other payment providers' ) );
// By default it's hidden, so when toggle it shows.
// Second call after "tasklist_payments_options".
@ -315,7 +315,7 @@ describe( 'PaymentGatewaySuggestions', () => {
'tasklist_payment_show_toggle',
{
toggle: 'show',
payment_method_count: paymentGatewaySuggestions.length - 1, // Minus one for WCPay since it's not counted in "other payment methods".
payment_method_count: paymentGatewaySuggestions.length - 1, // Minus one for WCPay since it's not counted in "Other payment providers".
},
] );
} );
@ -338,7 +338,7 @@ describe( 'PaymentGatewaySuggestions', () => {
/>
);
fireEvent.click( screen.getByText( 'Other payment methods' ) );
fireEvent.click( screen.getByText( 'Other payment providers' ) );
fireEvent.click( screen.getByText( 'See more' ) );
expect(
recordEvent.mock.calls[ recordEvent.mock.calls.length - 1 ]

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix wrong copy in the accordion link for payment task