How can I set the isCompleted status of an order from within a custom module?
This can be achieved with

Event::on(
            Order::class, 
            Order::EVENT_AFTER_COMPLETE_ORDER, 
            function(Event $e) {

                $order = $e-&gt;sender;

                $order-&gt;isCompleted = false;
                Craft::$app-&gt;getElements()-&gt;saveElement($order, false);

            }
        );


But I'm not sure it's actually a good idea anyway.