I'm writing a plugin for WordPress which has an e-commerce element to it, and would like to leverage WooCommerce's ordering and online payment features for it.
However, from what I can see, if I want to add anything from my plugin into a WooCommerce cart (and then have an order generated from it) then there needs to be a product ID created in WooCommerce for me to pass to the WC()->add_to_cart()
function.
If this is the case, it's not the end of the world - I'd just create a product in WooCommerce that acts as a "catch all" for everything my plugin adds to the cart, and use custom meta data on the cart items and order items to deal with the finer points of it.
But, it would be great if I could avoid this.
Is it possible?