🔀 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:
Philipp Stracker 2024-10-10 14:55:35 +02:00
commit 1d46f6154b
No known key found for this signature in database

View file

@ -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 ) {