Skip to content

Commit

Permalink
Release 2.0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
edgaraswallee committed Sep 1, 2022
1 parent bb5aee0 commit 1813c90
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ This repository contains the plentymarkets extension that enables to process pay

## Documentation

* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/plentymarkets/2.0.24/docs/en/documentation.html)
* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/plentymarkets/2.0.25/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/wallee-payment/plentymarkets/blob/2.0.24/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/plentymarkets/blob/2.0.25/LICENSE) for more information.
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/plentymarkets/releases/tag/2.0.24/">
<a href="https://github.com/wallee-payment/plentymarkets/releases/tag/2.0.25/">
Source
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"namespace": "Wallee",
"type": "payment",
"version": "2.0.24",
"version": "2.0.25",
"license": " Apache License Version 2",
"isClosedSource": false,
"pluginIcon": "icon_plugin_md.png",
Expand Down
14 changes: 11 additions & 3 deletions resources/lib/createTransactionFromOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,19 @@ function buildLineItem($orderItem, $uniqueId, $sku, $type, $basketNetPrices, $cu
}
$lineItem->setType($type);

$attributes = array();
$attributes = [];
foreach ($itemAttributes as $itemAttribute) {
$itemAttributeLabel = $itemAttribute['label'];
$itemAttributeValue = $itemAttribute['value'];
if (empty($itemAttributeLabel) && !empty($itemAttributeValue)) {
$itemAttributeLabel = $itemAttributeValue;
} else if (empty($itemAttributeLabel) || empty($itemAttributeValue)) {
continue;
}

$attribute = new LineItemAttributeCreate();
$attribute->setLabel(mb_substr($itemAttribute['label'], 0, 512, "UTF-8"));
$attribute->setValue(mb_substr($itemAttribute['value'], 0, 512, "UTF-8"));
$attribute->setLabel(mb_substr($itemAttributeLabel, 0, 512, "UTF-8"));
$attribute->setValue(mb_substr($itemAttributeValue, 0, 512, "UTF-8"));
$attributes['property_' . $itemAttribute['key']] = $attribute;
}
if (! empty($attributes)) {
Expand Down

0 comments on commit 1813c90

Please sign in to comment.