Skip to content

How to automatically add comment to comment history on order status change?

I’ve noticed that when an order goes from Pending to Processing there is no entry created in sales_order_status_history. This is a change from Magento 1, which kept a history entry for every status change. We need to track the time in processing for every order, so it would be helpful to get a timestamp for when each order went into that status. How would I go about having a comment added to the comment history automatically when any status change happens, with the status that it was changed to?