Skip to content

Instantly share code, notes, and snippets.

@ichaykin
Created October 17, 2022 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ichaykin/3df73c63f7eea45d0c625d5ad74cfe16 to your computer and use it in GitHub Desktop.
Save ichaykin/3df73c63f7eea45d0c625d5ad74cfe16 to your computer and use it in GitHub Desktop.
diff --git a/app/functions/fn.cart.php b/app/functions/fn.cart.php
index 5ff5c77ac6..76a6f42039 100644
--- a/app/functions/fn.cart.php
+++ b/app/functions/fn.cart.php
@@ -3437,16 +3437,6 @@ function fn_update_shipping($shipping_data, $shipping_id, $lang_code = DESCR_SL)
foreach (array_keys(Languages::getAll()) as $shipping_data['lang_code']) {
db_query('INSERT INTO ?:shipping_descriptions ?e', $shipping_data);
}
-
- if ($shipping_data['rate_calculation'] === 'R') {
- $all_destinations = db_get_fields('SELECT destination_id FROM ?:destinations WHERE status = ?s', ObjectStatuses::ACTIVE);
- $rates = [];
- foreach ($all_destinations as $destination_id) {
- $rates['delivery_time'][$destination_id] = null;
- $rates[$destination_id]['base_rate'] = 0;
- }
- $shipping_data['rates'] = $rates;
- }
}
if ($shipping_id) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment