Difference Between sales_order_place_after and sales_order_save_after in Magento

event-observermagento-1.9magento2orders

Magento 1 and Magento 2 both have the two event:

  1. sales_order_place_after
  2. sales_order_save_after.

I have some confusion about them, what is the detailed differences between them?

Which situation to use which?

Best Answer

sales_order_place_after

  1. This event is dispatched after the order payment is placed.
  2. This event function from Mage_Sales_Model_Order::place() in Magento 1 & \Magento\Sales\Model\Order::place() in Magento 2

sales_order_save_after

  1. This event is called every time the order is saved. For eg. Order status changed, invoiced, shipped & credit memo.
  2. This event extending the abstract model Mage_Core_Model_Abstract

    For eg. the Mage_Sales_Model_Order class event prefix is sales_order, so the actual after loading event’s name will be sales_order_load_after.