This plugin allows you to connect your Vimeo account to your WooCommerce site, and sell access to your private, password protected videos at Vimeo to …
This plugin & its author are in no way affiliated with Vimeo or WooCommerce; this is an open source project to link the two.
With Video Sales for Woocommerce with Vimeo, selling access to your Vimeo videos via WooCommerce has never been easier. Vimeo allows you to password protect your videos, and we can utilize this feature to allow us to sell premium access to those password protected videos!
You can easily connect your Vimeo account to your WooCommerce site using Vimeo’s free API. Once you’ve configured the plugin, you will be able to select videos from your Vimeo library when creating your products.
Once your products have been associated with their respective videos, you can edit your WooCommerce email notifications & thank you messages in your theme and include the meta data of your video in payment confirmations to your users (examples of meta data would be
the video’s Name, Link, Password for access, etc).
/wp-content/plugins/woocommerce-vimeo
directory, or install the plugin through the WordPress plugins screen directly.Configurations page at https://your-site.com/wp-admin/admin.php?page=wc-settings&tab=vimeo & config for Vimeo API
Cache & Cron options with manual triggers at https://your-site.com/wp-admin/admin.php?page=wc-settings&tab=vimeo
Upload a video to Vimeo
Set Privacy Options for video & password protect it
Set Password for your video
Edit video settings after saving
Manage Privacy settings/password of a video after it's been uploaded
Select Vimeo video when adding/editing a WooCommerce Product
Products with Vimeo videos selected have a lot of extra meta data associated with the Vimeo video stored on them. You can access this data in your email templates, as it is stored as custom fields on the Product. The names of the custom fields are:
wc_vimeo_id
: The ID of the Vimeo video; the ID in the Vimeo URL https://vimeo.com/18293829wc_vimeo_password
: The password needed to access the video (will only be set if video is password protected at Vimeo)wc_vimeo_link
: The link to the Vimeo video (this is a full link https://vimeo.com/18293829)wc_vimeo_name
: The name, or title of the Vimeo videowc_vimeo_uri
: The uri of the Vimeo video (this is the link without the leading domain, e.g. /18293829)wc_vimeo_description
: The description of the video, if setwc_vimeo_duration
: The duration of the video, in secondswc_vimeo_status
: The status of the video, if it is available to be viewedThis plugin works by setting meta data from the Vimeo video on the Product when you select a video. There are many ways to deliver this meta data to your users on purchase of a product.
One way is to create an email template in your theme. See the sample gist here: https://gist.github.com/vastolf/42cc9359d6b616675d70659e6de6f7a4
Copy the content of the gist. In your theme (or child theme’s) folder create a file at /woocommerce/emails/customer-completed-order.php
and copy the contents of the gist into that file. So the full directory would be /wp-content/themes/{your theme or child theme}/woocommerce/emails/customer-completed-order.php
This gist gives some examples of how to access the Video data in your confirmation email, but you could do something similar in the processing email or other confirmation emails. You can edit this file and reformat it to suit your styling tastes.
For more information about custom WooCommerce emails, see the section called “Creating Custom Templates with Code” at https://woocommerce.com/posts/how-to-customize-emails-in-woocommerce/
This is likely due to caching. Video Sales for Woocommerce with Vimeo uses WordPress transients, a way of caching data that is resource intensive to generate or access.
This greatly increases performance, as your site doesn’t need to make a direct request to Vimeo every time it needs to check video data, and can instead use data from a recent request that already completed. This cache is set to clear every 15 minutes by default.
Note that depending on how many videos you have at Vimeo, making requests to get video data can be resource intensive. If you have many videos, you might consider increasing the cache clearing interval.
You can change the cache clear interval or clear the cache manually at https://your-site.com/wp-admin/admin.php?page=wc-settings&tab=vimeo (see screenshot 2)
If you’ve made a change to some video data at Vimeo, those changes may not be reflected on your site immediately.
To ensure that this plugin can work with other plugins that use meta data from the Product, a Vimeo video’s data gets stored on each individual Product it gets associted with.
For example, if you have a video at Vimeo with a name like “My Video” and you change it to “My Film”, any Products that had the “My Video” video from Vimeo selected will need to be updated when the Cron task runs for this plugin.
Products with Vimeo videos get checked for updates from Vimeo during the Cron task, which runs automatically on a set time interval, and which you can set yourself (default is every 15 minutes). Settings for Cron are at https://your-site.com/wp-admin/admin.php?page=wc-settings&tab=vimeo (see screenshot 2)
When the Cron task runs, all video meta data on the Products that needs updating gets updated. This shouldn’t be too much of an issue unless you have an update from Vimeo you need reflected immediately on your site; in that case, run the cron manually on the WooCommerce > Settings > Vimeo page