wc-downloadable-products
Installation
SKILL.md
WooCommerce downloadable products
Use WooCommerce's product and customer-download objects. A downloadable product definition is not itself customer access, and a permission row is not sufficient unless the related order currently permits downloads.
Start with the three-layer model
| Layer | Canonical representation | Answers |
|---|---|---|
| Product file | WC_Product_Download in $product->get_downloads() |
What file can this product deliver? |
| Entitlement | WC_Customer_Download |
Who may download which stable file ID, through which order, until when/how often? |
| Delivery | WC_Download_Handler |
Does this request pass every check, how is the file served, and is the attempt counted? |
Never infer access from _downloadable_files, product ownership, or a permission row alone. Resolve the actual order and use its is_download_permitted() gate.