Hi fellow programmers,
I would like to know how I can hook in to execute code after a certain action in Magento 2 has been done. As we're running a custom warehouse system, I'd like to reserve a customer's products after an order has been confirmed, but I have no clue as to how to do that.
I've looked in to overriding certain functions using plugins, but that seems a bit redundant as I don't want to copy the entire function body just to execute my own code afterwards.
I've read something about the special "after", "before" plugin functions you can specify, but I don't know how to implement those.
Is there another way or can I use the "before" and "after" plugin functions? If so, can someone point me towards a good resource that explains just that?
Thanks in advance!