From 2eaaf48984894ef67985934f298ebd38a5a46f37 Mon Sep 17 00:00:00 2001 From: Jisse Reitsma Date: Thu, 12 Sep 2024 13:39:01 +0200 Subject: [PATCH] Add order state config options --- Config/Source/OrderStateOptions.php | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Config/Source/OrderStateOptions.php diff --git a/Config/Source/OrderStateOptions.php b/Config/Source/OrderStateOptions.php new file mode 100644 index 0000000..5631671 --- /dev/null +++ b/Config/Source/OrderStateOptions.php @@ -0,0 +1,34 @@ +getStates() as $state) { + $options[] = ['value' => $state, 'label' => $state]; + } + + return $options; + } + + private function getStates(): array + { + return [ + Order::STATE_NEW, + Order::STATE_PAYMENT_REVIEW, + Order::STATE_PENDING_PAYMENT, + Order::STATE_PROCESSING, + Order::STATE_COMPLETE, + Order::STATE_CANCELED, + Order::STATE_CLOSED, + Order::STATE_HOLDED, + ]; + } +}