WooCommerce Tips: Pay, Play & Download

woocommerce-tipsCan WooCommerce Do This?

There's a lot of things you can do when you use WooCommerce. One of the most recent questions I saw about WooCommerce was an interesting question that I thought you might like to hear (and see answered).

The goal was to create a site where a person could purchase a video – both as a digital download and as a page where you could watch it online.

WooCommerce makes it easy to sell digital downloads. But how do you do the other part – the “now that I paid, I'd like to watch it right away”?

Needed Plugins & Extensions

In order to do this, you'll need the following plugins and extensions:

WooCommerce Tips: The 7-Step Tutorial

The precursor of this tutorial is to install all the plugins listed above and activate them on your site. Once you're done with that, we're ready to get started.

1. Add a Group

While it seems counter-intuitive to start with the custom group, everything you're doing will be based on this, so it's the first place you want to start.

AddNewGroupWhy are you creating a group? Because you'll use this group (and it's rights/capabilities) to limit who has access to the page where you'll host your video. Every time someone purchases your product, you'll put them into this group, automatically.

2. Add a “view” capability

After you've created a group, you're going to want to create a new capability. This will be the “view my videos” capability so that anyone in the group you created will get to see the page (because it will have the capability restriction on it).

AddCapabilityBut creating your capability isn't enough. You need to link it to your group. So click on Groups again in the menu and then map the capability to the group you've created.

AssignCapabilitiesIn this image, you'll see I've created a Watch101 group, with a View101 capability. These capabilities (from these groups) will be leveraged to protect or give access to your video page(s).

3. Configure the rest of the Groups plugin

One last step to take care of in the Groups plugin is the configuration to make sure that your new capabilities show up in the right places to let you use them. You want to make sure that pages and posts are checked, but also, scroll down looking for your new capabilities and make sure you check them too.

CapabilitiesReadAccess

 

4. Configure WooCommerce

If you've installed the Groups for WooCommerce extension right, you'll see a Groups link in the WooCommerce menu. If that's the case, click on it, so you can configure the integration between WooCommerce and Groups.

The key is telling WooCommerce when to put the user (that just registered) into the group – while the order is processing, or after the order is complete.

DetermineWhenAddToGroup

One last note you'll notice is that you have to let users create accounts, so just expect that to show up. You can't determine who sees and doesn't see stuff without them having an account. So WooCommerce will automatically have people register.

5. Create your Page

Now we're getting somewhere. Go create a page where you'll host your videos. It could be one page with one video. Or a page with several. You're call. But this is the page that people will have rights to, after purchasing the video to download.

AccessRestrictions

What you'll notice is that on the top right you'll have the option to determine who gets rights to see this page. Those checkboxes are capabilities. Since you've matched those capabilities to your group, anyone in that group will get to view this page.

6. Create Your Downloadable Product

With groups and capabilities defined, and your page set up, you're now ready to create your downloadable product.

So step into WooCommerce and create a new product. Make it simple, and check the “downloadable” box, so that you can define the url of the file that you want people to be able to download (in this case your downloadable video file).

SimpleDownloadable7. Configure the Product's Groups Options

We're finally there. The flow is pretty simple.

People will buy your downloadable video, automatically get access to the file, and then get access to the page where they could view it. But they can't see the page if they're not in the right group.

That's your last step. Click on the Groups part of the product, and determine which groups you want to put someone in after they've purchased this product.

AddUserToGroup

Additional Notes

When you do this right, the page you create will give a 404 for people who don't have rights. Only those with rights will see the page.

Additionally, when it comes to hosting video, I use Vimeo Pro so that I can not only embed my video, but limit who can embed it by domain (where only my domain is listed).

This solution doesn't look at recurring charges. This is a one-time charge solution. If you want recurring charges, you'd need to add the Subscriptions extension for WooCommerce.

Conclusion

You can't do everything with WordPress, or with WooCommerce. But you can do a lot. Hopefully this has introduced you to Groups and the WooCommerce Groups extension and how helpful it can be in creating solutions like this one.