Adobe AD0-E704 Exam - Topic 2 Question 78 Discussion
You are developing a new payment method. It is required that any new order created with this payment method needs to have a specific custom status. Assume the status has been added to the system already, assigned to the processing state, and the new order state for the payment method is processing. How do you set the custom status on orders placed with the new payment method?
C) Create an observer for the event sales_order_set_status, get the $status parameter and set the new status using $status->setStatus()
A) Add a custom status code to the Magento\Sales\Model\Order-\Payment class as a $newOrderStatus constructor parameter using di.xml
B) Create a system configuration option order.status and set the status code as its value
D) Create a command setOrderStatus and add it to a commandPool with a name set_status
Currently there are no comments in this discussion, be the first to comment!