diff --git a/src/Model/FileSupport/BuyRequest/CustomizableOptionDataProvider.php b/src/Model/FileSupport/BuyRequest/CustomizableOptionDataProvider.php index 48a8c1d..d26b08a 100644 --- a/src/Model/FileSupport/BuyRequest/CustomizableOptionDataProvider.php +++ b/src/Model/FileSupport/BuyRequest/CustomizableOptionDataProvider.php @@ -64,6 +64,12 @@ public function execute(CartItem $cartItem): array [$optionType, $optionId, $optionValue] = $optionData; + // Handle previously uploaded file when add product with 'File' customizable option to wishlist + if(strpos($optionValue, "file-") === 0){ + [$filePrefix, $encodedFileInfo] = \explode('-', $optionValue); + $optionValue = json_decode(base64_decode($encodedFileInfo)); + } + if ($optionType == self::OPTION_TYPE) { $customizableOptionsData[$optionId][] = $optionValue; }