How to add programmatically new order status and state using Data Patch in Magento 2?
To create new order status and state follow below steps: Create folder Setup/Patch/Data in your module Create file UpdateOrderStatuses.php Implement method apply in the class UpdateOrderStatuses Run bin/magento setup:upgrade When you run Upgrade command, Magento runs your patch and it […]