Skip to content

Commit

Permalink
Class Cart: decode JSON to an array.
Browse files Browse the repository at this point in the history
Following code expects such an array.

Solution found by @getdatakick, thank you very much!

This solves part 2 of issue #550.
  • Loading branch information
Traumflug committed Jul 18, 2018
1 parent 371cf79 commit cf7adb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ public function getDeliveryOption($defaultCountry = null, $dontAutoSelectOptions

// The delivery option was selected
if (isset($this->delivery_option) && $this->delivery_option != '') {
$deliveryOption = json_decode($this->delivery_option);
$deliveryOption = json_decode($this->delivery_option, true);
$validated = true;
if (is_array($deliveryOption)) {
foreach ($deliveryOption as $idAddress => $key) {
Expand Down

0 comments on commit cf7adb2

Please sign in to comment.