You can achieve this from admin and need one change on system.xml Add below code:
Default Order Statuses in Magento 2. To check the list of predefined order statuses, go to Stores - Order Status. You'll see all the existing statutes in the store. Set ...
The status of each order is shown in the Status column of the Orders grid. Your store has a set of predefined order status and order state ...
How to change order status? Go to Sales > Orders to view a list of your existing orders. magento 2 order list. Click on the order whose ...
To assign an order status to a state: · Choose the Order Status that you want to assign. · Set Order State to the place in the workflow where the ...
A simple solution. When you look at the system.xml -file of Magento's default payment module, you'll see that for the dropdown of each ...
As I understand in Magento it sets the status of a new order to processing and then goes away and sorts out the payment etc. The problem is ...
Go System>Configuration >Payment Method > Cash On Delivery. And set the state to pending.
Setting Order Status with Payment Gateway
By default new order status is "Processing" set by magento. If you select any specific status for that payment method then that status will set.