How can I pass a custom/dynamic product to the Woocommerce cart?

How can I pass a custom/dynamic product to the Woocommerce cart?