Woocommerce Variable stock management

This is set out to solve the problem of dealing with WooCommerce’s variable products only ever deducting one from the total product stock.
The use case I had for it was as follows:
Client wants to sell packs of cigars 3/5/10 and wants each variation to deduct from the main product total.
So I built this simple plugin to manage variable product stock and update product quantities dynamically, using woocommerce.
Basically it solves this question not mine but it ilustrates the point: