I have the following script in custom module to change an order from processing to a custom order's status


i found that the status field in sales_order is updated, but the status field in sales_order_grid is not updated (occur in magento 2.2.6 commerce edition, but ok in 2.3 ce edition).

Anyone has idea what is the possible problem.


I am currently using magento226. I tested it for the situation you said, and there is no such situation. can you try this code and let me see what happens.

            // test code
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $orderRepository = $objectManager->create(\Magento\Sales\Api\OrderRepositoryInterface::class);
            $orderId = "xxxxx";
            $order = $orderRepository->get($orderId);
  • i don't know why 2.2.6 need me run a command to update the column at sales_order table bin/magento cron:run – hkguile Sep 5 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.