How to change a field value in a product variation when someone edited the order manually? I had implemented a "Event Subscriber" controller to change the stock value in the product variation. Stock is a field in product variation. 

Depending upon the quantity in order items I am decreasing the value of stock by subscribing to Drupal 8 event order $events['commerce_order.place.post_transition']. Similarly I increased stock value if he cancels the order using the event $events['commerce_order.cancel.post_transition']. 

If somebody revise the order quantity from Back-office that time, stock should be increased or decreased accordingly. How can we achieve that? Is there any event when order items is edited?  we are currently decreasing stock when order is placed... how can we decrease/increase when somebody edit the order from backend manually?
Is there any event when order items is edited? 


You could use hook_ENTITY_TYPE_update

/*
 * Implements hook_ENTITY_TYPE_update()
 */
function mymodule_order_update(\Drupal\commerce_order\Entity\OrderInterface $order) {
  // your code goes here
}




If you don't want to use a hook, then consider using the Hook Event Dispatcher module.


  This module dispatches events for several Drupal core hooks. This
  allows you to use the D8 Event Subscriber system, instead of the
  outdated hook system, to react on certain events. The module includes
  events for the most common hooks.