Skip to content

Commit 567b331

Browse files
De-duplicated some code
1 parent 4660956 commit 567b331

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ public function getStateStatuses($state, $addLabels = true)
206206
return $this->stateStatuses[$key];
207207
}
208208
$statuses = [];
209-
$area = $this->state->getAreaCode();
210209

211210
if (!is_array($state)) {
212211
$state = [$state];
@@ -218,7 +217,7 @@ public function getStateStatuses($state, $addLabels = true)
218217
foreach ($collection as $item) {
219218
$status = $item->getData('status');
220219
if ($addLabels) {
221-
$statuses[$status] = $area == 'adminhtml' ? $item->getLabel() : $item->getStoreLabel();
220+
$statuses[$status] = $this->getStatusLabel($status);
222221
} else {
223222
$statuses[] = $status;
224223
}

0 commit comments

Comments
 (0)