mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Fix update shipping option in block pages.
This commit is contained in:
parent
2ffb580ef1
commit
4a5b1fbc90
1 changed files with 2 additions and 0 deletions
|
@ -299,6 +299,7 @@ const PayPalComponent = ({
|
|||
try {
|
||||
const shippingOptionId = data.selectedShippingOption?.id;
|
||||
if (shippingOptionId) {
|
||||
await wp.data.dispatch('wc/store/cart').selectShippingRate(shippingOptionId);
|
||||
await shippingData.setSelectedRates(shippingOptionId);
|
||||
}
|
||||
|
||||
|
@ -358,6 +359,7 @@ const PayPalComponent = ({
|
|||
try {
|
||||
const shippingOptionId = data.selectedShippingOption?.id;
|
||||
if (shippingOptionId) {
|
||||
await wp.data.dispatch('wc/store/cart').selectShippingRate(shippingOptionId);
|
||||
await shippingData.setSelectedRates(shippingOptionId);
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue