mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
🔀 Merge branch 'trunk'
# Conflicts: # modules/ppcp-applepay/resources/js/ApplepayManager.js # modules/ppcp-applepay/resources/js/ApplepayManagerBlockEditor.js # modules/ppcp-applepay/resources/js/boot-block.js # modules/ppcp-applepay/resources/js/boot.js
This commit is contained in:
commit
1d46f6154b
1 changed files with 8 additions and 0 deletions
|
@ -129,6 +129,14 @@ class CartScriptParamsEndpoint implements EndpointInterface {
|
|||
WC()->cart->get_shipping_packages()
|
||||
);
|
||||
|
||||
if ( ! count( $calculated_packages ) ) {
|
||||
// Shipping disabled, or no shipping methods available.
|
||||
$response['chosen_shipping_methods'] = array();
|
||||
$response['shipping_packages'] = array();
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
$shipping_packages = array();
|
||||
|
||||
foreach ( $calculated_packages[0]['rates'] as $rate ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue