-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dev/hack-logging-enhancements
- Loading branch information
Showing
87 changed files
with
1,816 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: add | ||
|
||
Add WooPay Klaviyo newsletter integration. |
4 changes: 4 additions & 0 deletions
4
changelog/dev-7264-remove-hooks-from-customer-service-constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: dev | ||
|
||
Remove hooks from customer and token services to dedicated methods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: add | ||
|
||
Add seller_message to failed order notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: fix | ||
Comment: Fix FedEx insurance rates with different currencies. | ||
|
||
|
4 changes: 4 additions & 0 deletions
4
changelog/fix-8620-fee-types-in-fees-brakedown-tooltip-are-not-internationalised
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Use translatable strings on the fee breakdown tooltip of the payment settings screen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
Add a rounding entry to Level 3 data for rare cases where rounding errors break calculations. |
4 changes: 4 additions & 0 deletions
4
changelog/fix-9418-hide-transaction-fees-when-transaction-is-not-captured
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Hide transaction fee on admin view order screen when transaction is not captured. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
Performance improvements for Disputes Needing Response task shown in WooCommerce admin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Ensure captured transactions appear in the Transactions tab without requiring a page refresh. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: add | ||
|
||
Refresh the cart and checkout pages when ECE is dismissed and the shipping options were modified in the payment sheet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Fix filtering in async Disputes CSV export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
Use "currency conversion fee" instead "foreign exchange fee" in payment timeline and various other places. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Checkout: Fix error when wc_address_i18n_params does not have data for a given country |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
Show express checkout for products w/o shipping but where tax is included into price. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
Set payment method title once title is known. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: fix | ||
Comment: fix: tokenized cart & multiple variations. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: fix | ||
Comment: fix: tokenized cart subscription signup fee price | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: fix | ||
Comment: fix: tokenized ECE item compatibility w/ product bundles | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
Fix payment method filtering when billing country changes in Blocks checkout. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Load checkout scripts when they are not previously loaded on checkout page. |
4 changes: 4 additions & 0 deletions
4
...ations-improve-message-shown-to-merchants-when-there-is-an-error-capturing-authorizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: update | ||
|
||
Update error messages for payment authorization actions to provide more specific and user-friendly feedback. |
4 changes: 4 additions & 0 deletions
4
changelog/update-5713-failed-orders-should-include-more-info-on-transaction-details-page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: update | ||
|
||
Add failure reason to failed payments in the timeline. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: update | ||
|
||
Update Embedded Components and MOX to support custom width and paddings. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import { | |
isUsingSavedPaymentMethod, | ||
dispatchChangeEventFor, | ||
togglePaymentMethodForCountry, | ||
isBillingInformationMissing, | ||
} from '../upe'; | ||
|
||
import { getPaymentMethodsConstants } from '../../constants'; | ||
|
@@ -22,11 +23,134 @@ jest.mock( 'wcpay/utils/checkout' ); | |
|
||
jest.mock( '../../constants', () => { | ||
return { | ||
...jest.requireActual( '../../constants' ), | ||
getPaymentMethodsConstants: jest.fn(), | ||
}; | ||
} ); | ||
|
||
function buildForm( fields ) { | ||
const form = document.createElement( 'form' ); | ||
fields.forEach( ( field ) => { | ||
const input = document.createElement( 'input' ); | ||
input.id = field.id; | ||
input.value = field.value; | ||
form.appendChild( input ); | ||
} ); | ||
return form; | ||
} | ||
|
||
describe( 'UPE checkout utils', () => { | ||
describe( 'isBillingInformationMissing', () => { | ||
beforeAll( () => { | ||
window.wc_address_i18n_params = { | ||
locale: { | ||
US: {}, | ||
HK: { | ||
postcode: { required: false }, | ||
}, | ||
default: { | ||
address_1: { required: true }, | ||
postcode: { required: true }, | ||
}, | ||
}, | ||
}; | ||
} ); | ||
|
||
beforeEach( () => { | ||
getUPEConfig.mockImplementation( ( argument ) => { | ||
if ( argument === 'enabledBillingFields' ) { | ||
return { | ||
billing_first_name: { | ||
required: true, | ||
}, | ||
billing_last_name: { | ||
required: true, | ||
}, | ||
billing_company: { | ||
required: false, | ||
}, | ||
billing_country: { | ||
required: true, | ||
}, | ||
billing_address_1: { | ||
required: true, | ||
}, | ||
billing_address_2: { | ||
required: false, | ||
}, | ||
billing_city: { | ||
required: true, | ||
}, | ||
billing_state: { | ||
required: true, | ||
}, | ||
billing_postcode: { | ||
required: true, | ||
}, | ||
billing_phone: { | ||
required: true, | ||
}, | ||
billing_email: { | ||
required: true, | ||
}, | ||
}; | ||
} | ||
} ); | ||
} ); | ||
|
||
it( 'should return false when the billing information is not missing', () => { | ||
const form = buildForm( [ | ||
{ id: 'billing_first_name', value: 'Test' }, | ||
{ id: 'billing_last_name', value: 'User' }, | ||
{ id: 'billing_email', value: '[email protected]' }, | ||
{ id: 'billing_country', value: 'US' }, | ||
{ id: 'billing_address_1', value: '123 Main St' }, | ||
{ id: 'billing_city', value: 'Anytown' }, | ||
{ id: 'billing_postcode', value: '12345' }, | ||
] ); | ||
expect( isBillingInformationMissing( form ) ).toBe( false ); | ||
} ); | ||
|
||
it( 'should return true when the billing information is missing', () => { | ||
const form = buildForm( [ | ||
{ id: 'billing_first_name', value: 'Test' }, | ||
{ id: 'billing_last_name', value: 'User' }, | ||
{ id: 'billing_email', value: '[email protected]' }, | ||
{ id: 'billing_country', value: 'US' }, | ||
{ id: 'billing_address_1', value: '123 Main St' }, | ||
{ id: 'billing_city', value: 'Anytown' }, | ||
{ id: 'billing_postcode', value: '' }, | ||
] ); | ||
expect( isBillingInformationMissing( form ) ).toBe( true ); | ||
} ); | ||
|
||
it( 'should use the defaults when there is no specific locale data for a country', () => { | ||
const form = buildForm( [ | ||
{ id: 'billing_first_name', value: 'Test' }, | ||
{ id: 'billing_last_name', value: 'User' }, | ||
{ id: 'billing_email', value: '[email protected]' }, | ||
{ id: 'billing_country', value: 'MX' }, | ||
{ id: 'billing_address_1', value: '123 Main St' }, | ||
{ id: 'billing_city', value: 'Anytown' }, | ||
{ id: 'billing_postcode', value: '' }, | ||
] ); | ||
expect( isBillingInformationMissing( form ) ).toBe( true ); | ||
} ); | ||
|
||
it( 'should return false when the locale data for a country has no required fields', () => { | ||
const form = buildForm( [ | ||
{ id: 'billing_first_name', value: 'Test' }, | ||
{ id: 'billing_last_name', value: 'User' }, | ||
{ id: 'billing_email', value: '[email protected]' }, | ||
{ id: 'billing_country', value: 'HK' }, | ||
{ id: 'billing_address_1', value: '123 Main St' }, | ||
{ id: 'billing_city', value: 'Anytown' }, | ||
{ id: 'billing_postcode', value: '' }, | ||
] ); | ||
expect( isBillingInformationMissing( form ) ).toBe( true ); | ||
} ); | ||
} ); | ||
|
||
describe( 'getSelectedUPEGatewayPaymentMethod', () => { | ||
let container; | ||
|
||
|
@@ -54,7 +178,7 @@ describe( 'UPE checkout utils', () => { | |
} ); | ||
|
||
test( 'Selected UPE Payment Method is card', () => { | ||
container.innerHTML = `<input | ||
container.innerHTML = `<input | ||
id="payment_method_woocommerce_payments" | ||
value="woocommerce_payments" | ||
name="payment_method" | ||
|
@@ -67,12 +191,12 @@ describe( 'UPE checkout utils', () => { | |
|
||
test( 'Selected UPE Payment Method is bancontact', () => { | ||
container.innerHTML = ` | ||
<input | ||
id="payment_method_woocommerce_payments_bancontact" | ||
value="woocommerce_payments_bancontact" | ||
name="payment_method" | ||
type="radio" | ||
class="input-radio" | ||
<input | ||
id="payment_method_woocommerce_payments_bancontact" | ||
value="woocommerce_payments_bancontact" | ||
name="payment_method" | ||
type="radio" | ||
class="input-radio" | ||
checked | ||
></input> | ||
`; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.