I am working on a wordpress plugin based on woocommerce and as a part of it I would ask site users to post products from front end form. I am saving the submitted data as post_type=product
so that I can enable users to create their own products based on woocommerce in which I have succeeded.
Now I want to allow users to upload a video for their product from the same front end form and I need to attach the video to the product. Finally the video should be displayed in the place of featured image in single-product
page.
What I noticed is woocommerce is allowing only image filetypes by default but I also want to add filetypes like mp4 and display it instead of product image. Can anyone help understanding the way to do it?