mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Fix checkout address update
Looks like update* only sends to server, and set* fills UI without immediately sending to the server
This commit is contained in:
parent
45986d3961
commit
885d7cab19
1 changed files with 2 additions and 2 deletions
|
@ -133,8 +133,6 @@ const PayPalComponent = ({
|
|||
let handleShippingChange = null;
|
||||
if (shippingData.needsShipping && !config.finalReviewEnabled) {
|
||||
handleShippingChange = async (data, actions) => {
|
||||
console.log(data)
|
||||
|
||||
try {
|
||||
const shippingOptionId = data.selected_shipping_option?.id;
|
||||
if (shippingOptionId) {
|
||||
|
@ -147,6 +145,8 @@ const PayPalComponent = ({
|
|||
shipping_address: address,
|
||||
});
|
||||
|
||||
await shippingData.setShippingAddress(address);
|
||||
|
||||
const res = await fetch(config.ajax.update_shipping.endpoint, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue