I am very new to EE2 and using Expresso Store in one of my websites in EE2 and need to use this hook when the order has completed and payment has been made successfully. The code I need to call is this: ee()->extensions->call('store_order_complete_end', $order);
What I would like to ask is what do I parse to the $data parameter?
When this hook runs, I need to call a function that generates a coupon code and add this code to the database, but what is the $order
parameter in this piece of code and where exactly in the project would I call this piece of code?