There are a few different WooCommerce Facebook groups and all of them have great discussions. Earlier today there was a question about selling videos with WooCommerce:
If I have video files in a cloud storage independent from my WordPress site can I link those videos and sell them as digital, downloadable products? I don’t want to store videos in my WordPress site.
The short answer is yes – WooCommerce can sell downloadable videos (or any sort of downloadable product).
WordPress has an awesome oEmbed feature where a user just has to enter the url of the media you want embedded and WordPress takes care of the rest. Sadly, this only works when you put the link in the content. If you’re creating custom post types, a plugin, or using custom meta data you may run into a situation where you want to embed some media that isn’t in the content in which case you need to do a little coding.
Apply Filters to the Media
The first thing we have to do is add a filter right before you print your content. You can think of the apply_filters() function as a placeholder for more code.
Add WordPress Embed Functionality to Filter
The last thing we have to do is tell WordPress to add the default oEmbed functionality to anything in our filter.
You’re custom post data has the awesome oEmbed functionality. Time to celebrate. 🙂