Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serialization error for price rules #23

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.17.1 - 2023-11-14

### Fixes

- Fix unserialization error bij het laden van price rules

## 2.17.0 - 2023-10-05

### New
Expand Down
5 changes: 4 additions & 1 deletion Model/Carrier/Parcelpro.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ public function collectRates(RateRequest $request)
$weight = $request->getPackageWeight();
$shippingPrice = false;

$pricerules = $this->serialize->unserialize($this->getConfigData($key));
$configData = $this->getConfigData($key);
if (is_string($configData)) {
$pricerules = $this->serialize->unserialize($configData);
}

if (!empty($pricerules)) {
foreach ($pricerules as $pricerule) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "parcelpro/shipment",
"description": "Verzendmodule om gemakkelijk orders in te laden in het verzendsysteem van Parcel Pro.",
"version": "2.17.0",
"version": "2.17.1",
"keywords": [
"verzenden",
"pakket",
Expand Down
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<tooltip>
<![CDATA[Versie van onze plug-in]]>
</tooltip>
<comment>2.17.0</comment>
<comment>2.17.1</comment>
</field>
<field id="active" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enabled</label>
Expand Down