As of v3.0.5, the Amazon S3 for WooCommerce extension supports Cloudflare R2 and other S3-compatible platforms using the AWS SDK.
That means you can now serve digital downloads from R2 and other AWS-compatible services, without being locked into AWS S3 specifically.
⚠️ Important: Alternative storage services (like R2) are currently only supported via shortcodes. Automatic uploads and UI bucket selection are not available.
Setting up Cloudflare R2 for your WooCommerce product downloads
Go to Cloudflare R2 and create a bucket
You’ll need your:
- Bucket name
- Account ID
- Access key ID and secret (from your R2 API token)
Make sure to use R2-scoped API tokens, not account-wide tokens.
For more information on bucket-scoped tokens, check out the R2 Developer Documentation.
Authenticate with Cloudflare R2
Add this code snippet to your site with the Amazon S3 for WooCommerce extension installed. We have a bit of guidance on adding custom code to your store here. If you need further assistance, consult a developer or contact support!
Replace <your-account-id> in the code snippet with your actual R2 account ID.

Note: you do not need to store your credentials in the code snippet, as you can save them in the plugin settings when using only the:
region => 'auto'- and
endpoint => 'https://account-id.r2.cloudflarestorage.com'arguments.
Enter your Cloudflare R2 credentials
Go to WooCommerce → Amazon S3 and enter:
- Access Key ID
- Secret Access Key
Upload files directly to R2
Upload files to your bucket manually via:
- Cloudflare’s dashboard
rclone,s3cmd, or any S3-compatible CLI tool
Create Cloudflare R2 download shortcodes
Use this shortcode in your product’s downloadable file URL field:[amazon_s3_download bucket="your-bucket-name" object="file.pdf"]
You can use the shortcode generator on your WooCommerce add/edit product page for assistance in creating shortcodes once you complete setup.
⚠️ Current limitations
- Only the Amazon S3 shortcode feature is currently supported. This method does not support automatic file uploads or bucket browsing.
- If you see 403 errors:
- Confirm your API token has GetObject permission
- Double-check the bucket name and endpoint
Troubleshooting and additional support
If you’re running into issues, you can enable two layers of debug logging. Simple logging is available in the plugin settings.
Enhanced debug logging is available using this additional snippet:
add_filter( 'woocommerce_amazon_s3_client_debug_mode', '__return_true' );
Warning: This will log everything, including sensitive data. Use only for short-term troubleshooting, then remove it.
This is still an experimental compatibility, but we intend to improve upon it further. If you’re trying it out and need assistance, please don’t hesitate to contact our support team. Even if it’s just to give us feedback!