mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix default shipping method
This commit is contained in:
parent
8526adbcee
commit
bdf472c3dc
1 changed files with 3 additions and 1 deletions
|
@ -163,8 +163,10 @@ class UpdatePaymentDataEndpoint {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$chosen_shipping_methods = WC()->session->get( 'chosen_shipping_methods' );
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'defaultSelectedOptionId' => $shipping_options[0]['id'],
|
'defaultSelectedOptionId' => ( $chosen_shipping_methods[0] ?? null ) ? $chosen_shipping_methods[0] : $shipping_options[0]['id'],
|
||||||
'shippingOptions' => $shipping_options,
|
'shippingOptions' => $shipping_options,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue