In this article, we will show you how to protect and sell WooCommerce products stored in Wasabi bucket.
Requirements:
- WordPress Amazon S3 Smart Upload version 1.1.0 and greater
- PDA S3 Integration version 1.1.5.3 and greater
- Prevent Direct Access (PDA) Gold version 3.1.0 and greater
1. Upload files to Wasabi bucket
You can upload files directly to Wasabi bucket via Wasabi management console or from your WordPress admin dashboard.
To upload files without leaving the admin dashboard, please follow the steps below:
Step 1: Go to Media >> Upload to S3 menu and configure your Wasabi bucket.
Step 2: Once done, reload this page and start uploading your files.
All files uploaded via our plugin will be private by default. That means no one can access these files directly even though you grant public access to your bucket.
Tick “Show it under media library” if you want to add the upload files to your media library. Once added, these Wasabi files can be managed like other WordPress media files. You can insert them into WooCommerce products, for example.
Wasabi uploads will display in the right sidebar. Simply right-click on the filename to copy the file URL as well as presenting it under Media Library.
2. Sell WooCommerce products using Wasabi URLs
Step 1: Create or edit a WooComerce product
Step 2: Insert the Wasabi file URL in “Downloadable files” field
Step 3: Click Publish or Update to save your files
Once a customer purchases your products, they will be served protected files via Wasabi links which will automatically expire after 60 seconds by default.
Please note that:
- You can change the expiration time of these signed URLs by customizing SSU_SURL_EXPIRY value. Let’s say you want to the signed URLs will automatically expire after 10 seconds, replace “60” to “10” in the line below under your wp-config.php file.
define('SSU_SURL_EXPIRY', 60); // 60 seconds
- You can restrict file access using both Wasabi signed URLs and built-in WooCoommerce functions.