Score:0

Event called when an order line is removed

cn flag

In Drupal Commerce what event do i need to subscribe to when an order line is removed?

This questions talks about an order being removed/deleted: Which events are invoked when an order is removed or cancelled?

The Commerce documentation also only refers to entire orders in terms of events: https://docs.drupalcommerce.org/commerce2/developer-guide/orders/workflows/react-to-workflow-transitions

However I am not seeking an event when the entire order is removed/deleted, only when an individual line is removed/deleted from an order.

Also if I susbcribe to an event that is called when an order line is removed, will that same event be called for each line when an entire order is deleted?

Score:1
cn flag

I found the event i needed:

commerce_order.commerce_order_item.delete

The second part of my question I will post as a new question to make it more clear.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.