-
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 fix/8029-prb-invalid-recurring-shipping-m…
…ethod
- Loading branch information
Showing
29 changed files
with
493 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: add | ||
|
||
Add BNPL terms to checkout payment 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,5 @@ | ||
Significance: patch | ||
Type: add | ||
Comment: Adding skeleton component to BNPL messaging on cart page which has not yet been deployed. | ||
|
||
|
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: dev | ||
Comment: chore: remove unused use statement in tests | ||
|
||
|
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: update | ||
|
||
Adding a tracking event for external redirects to update account details, more consistent behaviour for redirects. |
4 changes: 4 additions & 0 deletions
4
changelog/fix-8559-multi-currency-decimal-separator-not-applying
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 that the currency configurations are set correctly when multi-currency is enabled. |
4 changes: 4 additions & 0 deletions
4
changelog/fix-infinite-recursive-call-for-price-decimal-separator-filter
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 we avoid an infinite recursive call stack through 'wc_get_price_decimal_separator' filter. |
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
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,71 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { | ||
Elements, | ||
PaymentMethodMessagingElement, | ||
} from '@stripe/react-stripe-js'; | ||
import { normalizeCurrencyToMinorUnit } from '../utils'; | ||
|
||
export default ( { | ||
api, | ||
upeConfig, | ||
upeName, | ||
stripeAppearance, | ||
upeAppearanceTheme, | ||
} ) => { | ||
const cartData = wp.data.select( 'wc/store/cart' ).getCartData(); | ||
|
||
// Stripe expects the amount to be sent as the minor unit of 2 digits. | ||
const amount = normalizeCurrencyToMinorUnit( | ||
cartData.totals.total_price, | ||
cartData.totals.currency_minor_unit | ||
); | ||
|
||
// Customer's country or base country of the store. | ||
const currentCountry = | ||
cartData.billingAddress.country || | ||
window.wcBlocksCheckoutData.storeCountry; | ||
|
||
// console.log( currentCountry ); | ||
|
||
return ( | ||
<> | ||
<span> | ||
{ upeConfig.title } | ||
{ upeName !== 'card' && | ||
( upeConfig.countries.length === 0 || | ||
upeConfig.countries.includes( currentCountry ) ) && ( | ||
<> | ||
<Elements | ||
stripe={ api.getStripeForUPE( upeName ) } | ||
options={ { | ||
appearance: stripeAppearance ?? {}, | ||
} } | ||
> | ||
<PaymentMethodMessagingElement | ||
options={ { | ||
amount: parseInt( amount, 10 ) || 0, | ||
currency: | ||
cartData.totals.currency_code || | ||
'USD', | ||
paymentMethodTypes: [ upeName ], | ||
countryCode: currentCountry, | ||
displayType: 'promotional_text', | ||
} } | ||
/> | ||
</Elements> | ||
</> | ||
) } | ||
<img | ||
src={ | ||
upeAppearanceTheme === 'night' | ||
? upeConfig.darkIcon | ||
: upeConfig.icon | ||
} | ||
alt={ upeConfig.title } | ||
/> | ||
</span> | ||
</> | ||
); | ||
}; |
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
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.