Skip to content

Commit bdc97a0

Browse files
committed
MAGETWO-59149: [GITHUB] Outdated USPS container type list #6798
- Condition improvement
1 parent f9fc8ba commit bdc97a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Usps/Model/Carrier.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,13 @@ protected function _getXmlQuotes()
427427
$service = $r->getService();
428428
}
429429

430-
if (preg_match('/(FLAT RATE ENVELOPE|FLAT RATE BOX)$/', $r->getContainer())) {
430+
if (
431+
strpos($r->getContainer(), 'FLAT RATE ENVELOPE') !== false ||
432+
strpos($r->getContainer(), 'FLAT RATE BOX') !== false
433+
) {
431434
$service = 'Priority';
432435
}
436+
433437
$package->addChild('Service', $service);
434438

435439
// no matter Letter, Flat or Parcel, use Parcel

0 commit comments

Comments
 (0)