This feature is only available in the Pro edition. Upgrade to Pro to access download limits.
Pro: Download Limits
Download Limits restrict how many free downloads users can access within a specific time period. This prevents abuse, manages server resources, and encourages upgrades to paid plans or memberships.
Overview
Download Limits allow you to:
- Set daily, weekly, monthly, or yearly download quotas
- Apply limits globally or per-product
- Customize limits by user role, membership plan, or individual user
- Track limit usage in real-time
- Display remaining downloads to users
How It Works
Limit Enforcement
When a user attempts to download:
- Plugin checks if limits are enabled
- Identifies applicable limit (user > membership > role > global)
- Counts recent downloads within time period
- Compares count against limit
- Allows or blocks download
- Displays error message if limit reached
Time Periods
Limits reset automatically:
- Daily: Resets at midnight
- Weekly: Resets every 7 days from first download
- Monthly: Resets every 30 days from first download
- Yearly: Resets every 365 days from first download
Limit Priority
When multiple limits apply, priority order:
- Individual User Limits (highest priority)
- Membership Plan Limits
- User Role Limits
- Global Limits (lowest priority)
The most restrictive applicable limit is enforced.
Setting Up Download Limits
Enable Limits
- Go to WP Enhanced > Free Download Woo, then click Download Limits in the sidebar
- Check "Enable download limits"
- Configure limit settings
- Save changes
Global Limits
Set default limits for all users:
Limit Type:
- User ID: Track by logged-in user account (recommended)
- IP Address: Track by IP address (for guests)
Frequency:
- Daily
- Weekly
- Monthly
- Yearly
Amount:
- Number of downloads allowed per period
Products:
- All products
- Specific products only
Login Required:
- Require login to enforce User ID limits
- Optional for IP-based limits
Error Message:
- Custom message shown when limit reached
Example Configuration
Basic Setup:
Limit Type: User ID
Frequency: Daily
Amount: 5
Products: All products
Login Required: Yes
Error Message: "You've reached your daily download limit of 5. Please try again tomorrow."
This allows 5 downloads per day per user across all products.
User Role Limits
Setting Role-Based Limits
Customize limits by WordPress user role:
- Go to Download Limits > User Role Limits
- Select role (Subscriber, Customer, etc.)
- Set frequency and amount
- Choose products
- Save settings

Example Role Limits
Free Users (Subscriber):
- 3 downloads per day
- All products
Customers (Purchased something):
- 10 downloads per day
- All products
VIP Members:
- Unlimited downloads
- All products
Excluding Roles
Exclude specific roles from limits:
add_filter('somdn_user_limits_excluded', function($excluded, $user_id) {
$user = get_user_by('id', $user_id);
if (in_array('administrator', $user->roles)) {
return true; // Exclude administrators
}
return $excluded;
}, 10, 2);
Membership Plan Limits
WooCommerce Memberships Integration
Set custom limits per membership plan:
- Go to WooCommerce > Memberships > Membership Plans
- Edit a membership plan
- Scroll to "Free Download Limits" meta box
- Configure limits for this plan
- Save plan

Free Trial Limits
Set different limits during free trial:
Trial Period:
- 2 downloads per day
After Trial:
- 10 downloads per day
This encourages trial users to upgrade to paid membership.
Example Membership Limits
Basic Membership:
- 5 downloads per day
- Selected products only
Premium Membership:
- 20 downloads per day
- All products
Enterprise Membership:
- Unlimited downloads
- All products
See WooCommerce Memberships Integration for details.
Individual User Limits
Custom Limits Per User
Set unique limits for specific users:
- Go to Users > All Users
- Edit a user
- Scroll to "Free Download Limits" section
- Set custom limits
- Save user

Use Cases
Beta Testers:
- Unlimited downloads for testing
Problem Users:
- Reduced limits for abuse prevention
VIP Customers:
- Increased limits as reward
Partners:
- Custom limits per agreement
Product-Specific Limits
Limit Specific Products
Apply limits to selected products only:
- In limit settings, choose "Specific products"
- Select products from dropdown
- Save settings
Users can download unlimited times from products not in the list.
Example Product Limits
Premium Content:
- 2 downloads per week
- Only premium eBooks
Basic Content:
- Unlimited downloads
- All other products
Per-Product Limits
Set different limits for different products:
add_filter('somdn_get_user_custom_limits', function($limits, $user_id, $product_id) {
if ($product_id == 123) {
// Special limit for product 123
return array(
'type' => 'user',
'amount' => 1,
'freq' => 'Day',
'products' => array(123)
);
}
return $limits;
}, 10, 3);
Displaying Limits to Users
Account Page
Users see their limits on account page:
- Go to My Account > Downloads
- View "Download Limits" section
- See current usage and remaining downloads

Shortcode
Display limits anywhere with shortcode:
[download_limits]
Shows:
- Current downloads this period
- Total allowance
- Remaining downloads
- Reset date
Custom Display
Use code to show limits:
$limits = somdn_get_user_limits($user_id);
$count = somdn_get_user_download_count($user_id, $limits['freq']);
$remaining = $limits['amount'] - $count;
echo "You have {$remaining} downloads remaining today.";
Limit Reached Behavior
Error Messages
When limit is reached, users see:
- Custom error message
- Remaining time until reset
- Upgrade CTA (if configured)

Redirect on Limit
Redirect users when limit reached:
add_action('template_redirect', function() {
if (isset($_REQUEST['somdn_errors'][0]['download_limit_reached'])) {
wp_redirect(home_url('/upgrade/'));
exit;
}
}, 99);
Email Notifications
Notify users when limit reached:
add_action('somdn_download_limit_reached', function($user_id, $limits) {
$user = get_user_by('id', $user_id);
wp_mail(
$user->user_email,
'Download Limit Reached',
'You have reached your download limit. Upgrade for more downloads!'
);
}, 10, 2);
Bypassing Limits
Exclude Specific Users
Exclude users from limits:
add_filter('somdn_user_limits_excluded', function($excluded, $user_id) {
$excluded_users = array(1, 5, 10); // User IDs
if (in_array($user_id, $excluded_users)) {
return true;
}
return $excluded;
}, 10, 2);
Exclude Specific Products
Exclude products from limits:
add_filter('somdn_check_product_in_limit', function($in_limit, $product_id, $limits) {
$excluded_products = array(100, 200, 300);
if (in_array($product_id, $excluded_products)) {
return false; // Not subject to limits
}
return $in_limit;
}, 10, 3);
Temporary Limit Increase
Temporarily increase user's limit:
add_filter('somdn_get_user_custom_limits', function($limits, $user_id) {
// Double limits for user 123
if ($user_id == 123) {
$limits['amount'] = $limits['amount'] * 2;
}
return $limits;
}, 10, 2);
Use Cases
Freemium Model
Encourage upgrades:
- Free Users: 3 downloads per day
- Paid Members: Unlimited downloads
Resource Management
Prevent server overload:
- All Users: 10 downloads per day
- Prevents excessive bandwidth usage
Content Gating
Protect premium content:
- Premium Products: 1 download per week
- Basic Products: Unlimited
Trial Periods
Limit trial users:
- Free Trial: 2 downloads per day
- Paid Subscription: 20 downloads per day
Abuse Prevention
Stop problematic users:
- Normal Users: 10 downloads per day
- Flagged Users: 1 download per day
Troubleshooting
Limits Not Enforcing
If limits aren't working:
- ✅ Verify limits are enabled
- ✅ Check tracking is enabled (required)
- ✅ Verify user is logged in (for User ID limits)
- ✅ Clear all caches
- ✅ Check for plugin conflicts
Wrong Limit Applied
If wrong limit is enforced:
- ✅ Check limit priority (user > membership > role > global)
- ✅ Verify membership is active
- ✅ Check user role assignments
- ✅ Review custom limit filters
- ✅ Test with different user
Limit Not Resetting
If limit doesn't reset:
- ✅ Check frequency setting (Day/Week/Month/Year)
- ✅ Verify time zone settings
- ✅ Check cron is running
- ✅ Clear object cache
- ✅ Test with new download
Count Incorrect
If download count is wrong:
- ✅ Verify tracking is working
- ✅ Check date range calculation
- ✅ Look for duplicate log entries
- ✅ Review custom count filters
- ✅ Regenerate statistics
Developer Hooks
Filters
somdn_user_limits_excluded
Exclude users from limits.
add_filter('somdn_user_limits_excluded', function($excluded, $user_id) {
// Your logic
return $excluded;
}, 10, 2);
somdn_get_user_custom_limits
Modify user's limits.
add_filter('somdn_get_user_custom_limits', function($limits, $user_id, $product_id) {
// Your logic
return $limits;
}, 10, 3);
somdn_check_product_in_limit
Control which products are limited.
add_filter('somdn_check_product_in_limit', function($in_limit, $product_id, $limits) {
// Your logic
return $in_limit;
}, 10, 3);
Actions
somdn_download_limit_reached
Fires when user hits limit.
add_action('somdn_download_limit_reached', function($user_id, $limits) {
// Send notification, log event, etc.
}, 10, 2);
Best Practices
Setting Limits
- Start generous: Begin with higher limits, reduce if needed
- Monitor usage: Track average downloads per user
- Test thoroughly: Test with different user types
- Clear messaging: Explain limits to users
User Experience
- Show remaining: Display remaining downloads
- Explain resets: Tell users when limits reset
- Offer upgrades: Provide path to unlimited downloads
- Fair limits: Set reasonable limits for legitimate use
Performance
- Use User ID: More accurate than IP address
- Require login: Enables User ID tracking
- Cache counts: Cache download counts when possible
- Optimize queries: Use efficient database queries
Communication
- Privacy policy: Document limit tracking
- Terms of service: Explain limit policies
- Support docs: Provide limit information
- Email updates: Notify users of limit changes
Related Topics
- Download Tracking - Required for limits
- Email Capture - Collect user information
- Account History - Users view their downloads
- WooCommerce Memberships - Membership limits
- Settings Reference Pro - Complete Pro settings