Skip to content

Commit 193849a

Browse files
committed
ACP2E-2756: [Cloud] Order Status changed to complete when partially refund of a partially shipped order
- orders can have no status apparently
1 parent a47f0a1 commit 193849a

File tree

1 file changed

+6
-6
lines changed
  • app/code/Magento/Sales/Model/ResourceModel/Order/Handler

1 file changed

+6
-6
lines changed

app/code/Magento/Sales/Model/ResourceModel/Order/Handler/State.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public function check(Order $order)
5050
* Check if order can be automatically switched to complete status
5151
*
5252
* @param Order $order
53-
* @param string $currentState
53+
* @param string|null $currentState
5454
* @return bool
5555
*/
56-
private function canBeCompleteStatus(Order $order, string $currentState): bool
56+
private function canBeCompleteStatus(Order $order, ?string $currentState): bool
5757
{
5858
if ($currentState === Order::STATE_PROCESSING && !$order->canShip()) {
5959
return true;
@@ -66,10 +66,10 @@ private function canBeCompleteStatus(Order $order, string $currentState): bool
6666
* Check if order can be automatically switched to closed status
6767
*
6868
* @param Order $order
69-
* @param string $currentState
69+
* @param string|null $currentState
7070
* @return bool
7171
*/
72-
private function canBeClosedStatus(Order $order, string $currentState): bool
72+
private function canBeClosedStatus(Order $order, ?string $currentState): bool
7373
{
7474
if (in_array($currentState, [Order::STATE_PROCESSING, Order::STATE_COMPLETE])
7575
&& !$order->canCreditmemo()
@@ -90,10 +90,10 @@ private function canBeClosedStatus(Order $order, string $currentState): bool
9090
* Check if order can be automatically switched to processing status
9191
*
9292
* @param Order $order
93-
* @param string $currentState
93+
* @param string|null $currentState
9494
* @return bool
9595
*/
96-
private function canBeProcessingStatus(Order $order, string $currentState): bool
96+
private function canBeProcessingStatus(Order $order, ?string $currentState): bool
9797
{
9898
if ($currentState == Order::STATE_NEW && $order->getIsInProcess()) {
9999
return true;

0 commit comments

Comments
 (0)