Skip to content

Commit 1f32c70

Browse files
ragnesefballiano
andauthored
Fixed erroneous call to getText() method in Mage_Usa_Model_Shipping_Carrier_Ups::getAllowedMethods() (#4013)
Co-authored-by: Fabrizio Balliano <[email protected]>
1 parent 1b86733 commit 1f32c70

File tree

1 file changed

+2
-8
lines changed
  • app/code/core/Mage/Usa/Model/Shipping/Carrier

1 file changed

+2
-8
lines changed

app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,18 +1330,12 @@ public function getResponse()
13301330
public function getAllowedMethods()
13311331
{
13321332
$allowedMethods = explode(',', (string)$this->getConfigData('allowed_methods'));
1333-
$isUpsXml = $this->getConfigData('type') === 'UPS_XML';
1334-
$isUpsRest = $this->getConfigData('type') === 'UPS_REST';
1335-
$origin = $this->getConfigData('origin_shipment');
1336-
1337-
$availableByTypeMethods = ($isUpsXml || $isUpsRest)
1338-
? $this->getCode('originShipment', $origin)
1339-
: $this->getCode('method');
1333+
$availableByTypeMethods = $this->getCode('originShipment', $this->getConfigData('origin_shipment'));
13401334

13411335
$methods = [];
13421336
foreach ($availableByTypeMethods as $methodCode => $methodData) {
13431337
if (in_array($methodCode, $allowedMethods)) {
1344-
$methods[$methodCode] = $methodData->getText();
1338+
$methods[$methodCode] = $methodData;
13451339
}
13461340
}
13471341

0 commit comments

Comments
 (0)