File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/code/Magento/Sales/Model/Service Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -242,9 +242,11 @@ private function prepareBundleQty(\Magento\Sales\Api\Data\OrderItemInterface $or
242
242
{
243
243
if ($ orderItem ->getProductType () == Type::TYPE_BUNDLE && !$ orderItem ->isShipSeparately ()) {
244
244
foreach ($ orderItem ->getChildrenItems () as $ childItem ) {
245
- $ bundleSelectionAttributes = $ this ->serializer ->unserialize (
246
- $ childItem ->getProductOptionByCode ('bundle_selection_attributes ' )
247
- );
245
+ $ bundleSelectionAttributes = $ childItem ->getProductOptionByCode ('bundle_selection_attributes ' );
246
+ if (is_string ($ bundleSelectionAttributes )) {
247
+ $ bundleSelectionAttributes = $ this ->serializer ->unserialize ($ bundleSelectionAttributes );
248
+ }
249
+
248
250
$ qtys [$ childItem ->getId ()] = $ qtys [$ orderItem ->getId ()] * $ bundleSelectionAttributes ['qty ' ];
249
251
}
250
252
}
You can’t perform that action at this time.
0 commit comments