If you manage a digital e-commerce business, asset security is critical. A frustrating and confusing file management bug in WooCommerce involves duplicate or infinitely repeating download files showing up on a customer’s "My Account > Downloads" page. A user purchases a digital product that contains exactly one PDF file, but when they log into their dashboard profile, they see the same PDF link listed 5, 10, or even 50 times in a row.

This multiplying files bug is typically caused by a database duplication glitch triggered during bulk product updates or inventory sync actions. When you update a product using a bulk editing plugin, or run a data synchronization routine using an external WP All Import script, the system can accidentally append file access permissions to existing customer orders multiple times. Instead of replacing the old file relationship map, the update script stacks them repeatedly in the wp_woocommerce_downloadable_product_permissions table, forcing the customer's dashboard to display a distinct download link for every single duplicate row entry.

The Solution

Resolving this file duplication bug requires purging the duplicated permission keys from your database tables and standardizing how your bulk update scripts modify file arrays.

  1. Clean Database Duplicates: To safely fix existing customer accounts without breaking real order histories, run a clean deduplication query via your database editor (like phpMyAdmin). Backup your site, then run this SQL script on your database:

SQL
 
DELETE d1 FROM wp_woocommerce_downloadable_product_permissions d1
INNER JOIN wp_woocommerce_downloadable_product_permissions d2 
WHERE d1.permission_id < d2.permission_id 
AND d1.order_id = d2.order_id 
AND d1.product_id = d2.product_id 
AND d1.download_id = d2.download_id;

(Note: Replace wp_ with your custom database table prefix if applicable).

  1. Audit Import Key Mappings: If you use import plugins to update digital files, make sure the software is configured to Update and replace files based on unique IDs rather than Appending them to your product specifications.

  2. Clear Download Transients: Head over to WooCommerce > Status > Tools and clear all transient memory caches to ensure that the user dashboard displays your clean, deduplicated database structures instantly.