I have a form where people can register for a seminar, which entails filling out your personal info and then selecting which seminar (s) you want to attend, and how many tickets you want to buy. The user would fill it the form and when clicking submit, he is directed to a woocommerce shop page so he can add the desired seminar to his cart and pay for them.
I am trying to get rid of the middle step where the user adds the items to his cart, and would love to use the info from the form to add the respective items to the cart automatically.
I have found the following code which uses the on_sent_ok hook but I believe that is now obsolete and I'm not sure how to use it to add more than one product and quantities from their respective fields in the contact form:
Any ideas of code or plugins would be greatly appreciated!