All checks were successful
Create Release / build (push) Successful in 3s
WP Digital Download
A comprehensive WordPress plugin for creating a digital download marketplace where creators can sell digital products with PayPal integration.
Features
Core Functionality
- Custom Post Type: Products with rich metadata
- User Roles: Separate roles for customers and creators
- File Management: Secure file upload and protection
- PayPal Integration: Complete payment processing
- Download Protection: Secure, time-limited downloads
- Watermarking: Automatic watermarking for images and PDFs
- Purchase History: Customer account management
- Admin Dashboard: Complete order and sales management
Key Components
Custom Post Types
- wpdd_product: Digital products with pricing, files, and settings
- Product Categories & Tags: Organization and filtering
- Creator Attribution: Products linked to their creators
User Management
- Digital Customer Role: Purchase and download permissions
- Digital Creator Role: Product management permissions
- Admin Capabilities: Full system management
Payment Processing
- PayPal Integration: Sandbox and live modes
- Free Products: No-payment downloads
- Guest Checkout: Optional account creation
- Order Management: Complete transaction tracking
File Protection
- Protected Directory: Files stored outside web root access
- Secure Downloads: Token-based download links
- Download Limits: Configurable per product
- Expiry Dates: Time-limited access
Watermarking
- Image Watermarking: PNG, JPG, GIF support
- PDF Watermarking: Text overlay on PDF files
- Dynamic Content: Customer info in watermarks
- Configurable Settings: Per-product control
Installation
- Upload the plugin files to
/wp-content/plugins/wp-digital-download/
- Activate the plugin through the WordPress admin
- Configure PayPal settings in Digital Products > Settings
- Create your first product
- Add the shop shortcode
[wpdd_shop]
to a page
Configuration
PayPal Setup
- Create a PayPal Developer account
- Create a new application
- Get Client ID and Secret
- Configure in Settings > PayPal Settings
Pages Setup
The plugin automatically creates these pages:
- Shop:
[wpdd_shop]
- Product listing - Checkout:
[wpdd_checkout]
- Payment processing - My Purchases:
[wpdd_customer_purchases]
- Customer downloads - Thank You:
[wpdd_thank_you]
- Order confirmation
Shortcodes
Main Shortcodes
[wpdd_shop]
- Display product storefront[wpdd_customer_purchases]
- Customer purchase history[wpdd_checkout]
- Checkout form[wpdd_thank_you]
- Thank you page[wpdd_product id="123"]
- Single product display
Shop Shortcode Options
[wpdd_shop columns="3" per_page="12" category="design" orderby="date" order="DESC" show_filters="yes"]
Database Structure
Tables Created
wp_wpdd_orders
- Purchase recordswp_wpdd_downloads
- Download trackingwp_wpdd_download_links
- Secure download tokens
Key Meta Fields
_wpdd_price
- Product price_wpdd_sale_price
- Sale price_wpdd_is_free
- Free product flag_wpdd_files
- Associated files_wpdd_download_limit
- Download restrictions_wpdd_download_expiry
- Access duration_wpdd_enable_watermark
- Watermark settings_wpdd_sales_count
- Sales tracking
File Structure
wp-digital-download/
├── wp-digital-download.php # Main plugin file
├── includes/ # Core functionality
│ ├── class-wpdd-install.php # Installation routines
│ ├── class-wpdd-post-types.php # Custom post types
│ ├── class-wpdd-roles.php # User roles
│ ├── class-wpdd-metaboxes.php # Product editing
│ ├── class-wpdd-shortcodes.php # Frontend display
│ ├── class-wpdd-paypal.php # Payment processing
│ ├── class-wpdd-download-handler.php # File delivery
│ ├── class-wpdd-customer.php # Customer management
│ ├── class-wpdd-orders.php # Order processing
│ ├── class-wpdd-file-protection.php # Security
│ ├── class-wpdd-watermark.php # Image processing
│ └── class-wpdd-ajax.php # AJAX handlers
├── admin/ # Admin interface
│ ├── class-wpdd-admin.php # Admin pages
│ └── class-wpdd-settings.php # Configuration
└── assets/ # Frontend resources
├── css/
│ ├── frontend.css # Public styling
│ └── admin.css # Admin styling
└── js/
├── frontend.js # Public scripts
├── admin.js # Admin scripts
└── paypal.js # Payment integration
Hooks & Filters
Actions
wpdd_order_completed
- Fired when order is completedwpdd_download_started
- Before file deliverywpdd_customer_registered
- New customer account
Filters
wpdd_product_price
- Modify displayed pricewpdd_download_url
- Customize download URLswpdd_watermark_text
- Modify watermark contentwpdd_email_content
- Customize email templates
Security Features
File Protection
- Files stored in protected directory with .htaccess rules
- Token-based download authentication
- Time-limited access links
- IP and user agent logging
Input Validation
- All user inputs sanitized
- Nonce verification on forms
- Capability checks for admin functions
- SQL injection prevention
Payment Security
- PayPal webhook verification
- Transaction ID tracking
- Duplicate payment prevention
- Secure credential storage
Customization
Template Override
Create templates in your theme:
your-theme/
└── wpdd-templates/
├── single-product.php
├── shop.php
└── checkout.php
CSS Customization
Override default styles:
.wpdd-product-card {
/* Your custom styles */
}
Adding Payment Methods
Extend payment options by hooking into:
add_action('wpdd_payment_methods', 'add_stripe_payment');
Requirements
- WordPress 5.0+
- PHP 7.4+
- MySQL 5.6+
- cURL extension
- GD library (for watermarking)
Changelog
Version 1.0.0
- Initial release
- PayPal integration
- File protection system
- Watermarking capabilities
- Customer management
- Admin dashboard
Support
For support and feature requests, please create an issue in the GitHub repository.
License
This plugin is licensed under the GPL v2 or later.
Note: This plugin handles financial transactions. Always test thoroughly in a development environment before deploying to production.
Description
2025.09.10-1316
Latest
Languages
PHP
89%
JavaScript
8.3%
CSS
2.4%
Shell
0.3%