Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/iashikhosen/dynamic-digital-downloads/archive/refs/heads/master.zipDynamic Digital Downloads 2.1.2
Dynamic Digital Downloads provides public free downloads and account-bound premium downloads backed by WooCommerce purchases.
2.1.2 cart destination update
- Premium Add to Cart actions now use WooCommerce's configured Cart page automatically, including sites that use a custom cart-page slug.
- The product is added through the Cart URL query and the customer lands directly on the cart instead of the site homepage.
2.1.1 reliability update
- Keeps non-buyers on a clean WooCommerce add-to-cart URL without carrying the download gateway query into a redirect loop.
- Enforces device limits on MySQL/MariaDB while remaining compatible with SQLite-based WordPress environments.
- Avoids invalid filesystem-root private paths and clearly reports a web-root fallback through Site Health.
- Preserves the original attachment filename in the Downloads admin list after private-storage migration.
Upgrade behavior
Version 2.1 reads all legacy content and indexes it in resumable background batches; it does not rewrite Download posts:
- An existing Download with
_do_dlo_selected_productis treated as Premium. - An existing Download without a connected product is treated as Free.
- Existing
[dynamic_digital_downloads file_id="123"],[list_digital_downloads],[user_downloaded_files], and[show_download_button_by_post_id]shortcodes remain supported. - Existing media, loop, single-page and custom-text meta keys remain supported.
- Missing v2 limits default to unlimited/off.
Back up the site and test the upgrade on staging before production deployment.
Access rules
- Free: no login or purchase is required.
- Premium: the visitor must log in to the purchasing account and have a Completed or Processing WooCommerce order containing the connected product.
- Access expiry starts from the paid/created date of the qualifying order.
- Link lifetime controls the short-lived signed URL created after a button click. The visible button itself is a stable gateway, so page caching does not leave stale signed links in HTML.
- Download and device limits are enforced per user and Download.
Purchased downloads library
Use [my_purchased_downloads] to show the current logged-in customer's Premium Dynamic Downloads connected to products in Completed or Processing WooCommerce orders. Optional attributes: columns="2", show_thumbnail="true", and show_product="true".
Security and private storage
- New Premium Downloads receive a randomized verified copy in the private directory by default.
- Open Downloads → Settings → Security & Performance to migrate existing Premium Downloads in resumable batches.
- To eliminate the old public uploads URL, enable remove the public Media Library file before migration. Enable this only when that attachment is not used elsewhere; the private copy is verified before removal.
- Define
DDD_PRIVATE_STORAGE_DIRinwp-config.phpwhen you want a specific directory outside the public web root. - For high-volume files, define
DDD_X_ACCEL_PREFIXfor an Nginx internal location orDDD_USE_X_SENDFILEfor Apache/LiteSpeed. PHP range-streaming remains a safe fallback. - Remote/offload providers can return a local path or a short-lived HTTPS URL through the
ddd_resolve_download_filefilter.
Performance
File/product mappings and user entitlements use indexed custom tables. Completed/Processing order events proactively write entitlements; legacy accounts are indexed on demand. The stable gateway re-authorizes every click, including when its button HTML came from a full-page cache. Large files can be handed directly to Nginx/Apache, while the fallback streams in 1 MB chunks with valid HTTP range support.
Compatibility and maintenance
- WooCommerce HPOS and Cart/Checkout Blocks compatibility are declared; order access uses WooCommerce CRUD APIs.
- A separate database schema version prevents unnecessary
dbDelta()runs on ordinary plugin releases. - Multisite activation and new-site table creation are supported.
- Daily orphan cleanup, user deletion cleanup, WordPress personal-data export/erase callbacks and Site Health checks are included.
- Plugin code continues to support PHP 7.4+, WordPress 5.8+, and works without WooCommerce for Free Downloads.
Installation
Upload the plugin ZIP from Plugins → Add New → Upload Plugin, activate it, and open Downloads. Activation creates the indexed access and device tables without modifying legacy Download posts.