mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
🔀 Merge branch 'trunk'
This commit is contained in:
commit
b8ab931a7a
98 changed files with 2589 additions and 936 deletions
|
@ -21,8 +21,8 @@ export const handleShippingOptionsChange = async ( data, actions, config ) => {
|
|||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-WC-Store-API-Nonce':
|
||||
config.ajax.update_customer_shipping.wp_rest_nonce,
|
||||
'Nonce':
|
||||
config.ajax.update_customer_shipping.wp_rest_nonce,
|
||||
},
|
||||
body: JSON.stringify( {
|
||||
rate_id: shippingOptionId,
|
||||
|
@ -106,9 +106,9 @@ export const handleShippingAddressChange = async ( data, actions, config ) => {
|
|||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-WC-Store-API-Nonce':
|
||||
config.ajax.update_customer_shipping
|
||||
.wp_rest_nonce,
|
||||
'Nonce':
|
||||
config.ajax.update_customer_shipping
|
||||
.wp_rest_nonce,
|
||||
},
|
||||
body: JSON.stringify( {
|
||||
shipping_address: cartData.shipping_address,
|
||||
|
|
|
@ -104,6 +104,6 @@ class DisabledFundingSources {
|
|||
$disable_funding = $all_sources;
|
||||
}
|
||||
|
||||
return $disable_funding;
|
||||
return apply_filters( 'woocommerce_paypal_payments_disabled_funding_sources', $disable_funding );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,8 +199,9 @@ class WooCommerceOrderCreator {
|
|||
$shipping_options = null;
|
||||
|
||||
if ( $payer ) {
|
||||
$address = $payer->address();
|
||||
$payer_name = $payer->name();
|
||||
$address = $payer->address();
|
||||
$payer_name = $payer->name();
|
||||
$payer_phone = $payer->phone();
|
||||
|
||||
$wc_email = null;
|
||||
$wc_customer = WC()->customer;
|
||||
|
@ -220,6 +221,7 @@ class WooCommerceOrderCreator {
|
|||
'state' => $address ? $address->admin_area_1() : '',
|
||||
'postcode' => $address ? $address->postal_code() : '',
|
||||
'country' => $address ? $address->country_code() : '',
|
||||
'phone' => $payer_phone ? $payer_phone->phone()->national_number() : '',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue