Skip to content

Commit

Permalink
20.45.2 MNB-1340 Fix for incorrect dispatch date showing in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
wsajason committed Aug 13, 2021
1 parent 3e0fa3e commit 8ef62c0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-PUBLIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,7 @@ MNB-1471 Add cache timeout. MNB-1465 Ensure order comment containing packing inf
MNB-1493 Move UK out of list of countries where postcode is optional


## 20.45.2 (2021-08-13)
MNB-1340 Fix for incorrect dispatch date showing in admin


4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,7 @@ MNB-1471 Add cache timeout. MNB-1465 Ensure order comment containing packing inf
MNB-1493 Move UK out of list of countries where postcode is optional


## 20.45.2 (2021-08-13)
MNB-1340 Fix for incorrect dispatch date showing in admin


2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "shipperhq/module-shipper",
"description": "Magento Shipping integration with ShipperHQ",
"type": "magento2-module",
"version": "20.45.1",
"version": "20.45.2",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
12 changes: 9 additions & 3 deletions src/Helper/CarrierGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,15 @@ public function __construct(
*/
public function saveCarrierGroupInformation($shippingAddress, $shippingMethod, array $additionalDetail = [])
{
//admin and front end orders use method
//MNB-1114 undo a change made for SHQ18-1391; no longer compare method price
$foundRate = $shippingAddress->getShippingRateByCode($shippingMethod);
// admin and front end orders use method
// MNB-1114 undo a change made for SHQ18-1391; no longer compare method price
// MNB-1340 Changed to call getAllShippingRates() instead of getShippingRateByCode as the latter can get an out of date rate
$foundRate = false;
foreach ($shippingAddress->getAllShippingRates() as $rate) {
if ($rate->getCode() == $shippingMethod) {
$foundRate = $rate;
}
}

if ($foundRate && $foundRate->getCarriergroupShippingDetails() != '') {
$shipDetails = $this->shipperDataHelper->decodeShippingDetails(
Expand Down
2 changes: 1 addition & 1 deletion src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "shipperhq/module-shipper",
"description": "Magento Shipping integration with ShipperHQ",
"type": "magento2-module",
"version": "20.45.1",
"version": "20.45.2",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion src/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<ws_timeout>30</ws_timeout>
<use_cache>0</use_cache>
<always_use_cache>1</always_use_cache>
<extension_version>20.45.1</extension_version>
<extension_version>20.45.2</extension_version>
<allowed_methods></allowed_methods>
<magento_version></magento_version>
<cache_timeout>300</cache_timeout>
Expand Down

0 comments on commit 8ef62c0

Please sign in to comment.