I am trying to create a woocommerce-site which is going to be a simple lottery with 1000 tickets. Each month there is one item being drawn, and there are four different products:
These need to be separate products since they have different prices,but I want to link them to the same stock inventory.
I have got this WooCommerce Lottery plugin, but it is built so that every single product is its own lottery, and there's no way to link all products to the same lottery.
I have realized I might need to code something on my own for this, but I have some concerns I really would need help with:
Would the hook
woocommerce_reduce_order_stock be sufficient to use to link products into the same lottery?
Once the lottery is finished, I want to gather all 1000 entries and randomize a winner. When reopening the lottery I would like to reset the order count for said product, in order to separate the orders from the past lottery with the new lottery. How would the best way to go about this be?
I would be happy for any input in order to get started. Thanks.