Completed Order Email doesn’t Contain Download Links

On some WooCommerce installs you can experience the following issue: when a customer purchases a downloadable product, the Complete Order Email doesn’t contain any download link for the customer to download purchased products. Here is how the email looks like in that case:

While it should look like this:

Missing SQL Table

This happens because a SQL table called wp_woocommerce_downloadable_product_permissions is missing in your database.

When activating WooCommerce, a few new SQL tables are added in your database. You can find the list of all tables here. But this process can fail sometimes if the WordPress SQL tables prefix is too long: the table name can’t contain more than 64 characters.

The following table describes the maximum length for each type of identifier in the database. Please note that the maximum length for table is 64:

Identifier Maximum Length (characters)
Database 64
Table 64
Column 64
Index 64
Constraint 64
Stored Program 64
View 64
Alias 256
Compound Statement Label 16

The WordPress SQL Table prefix is defined during WordPress install, and is stored in the file called wp-config.php.

How to solve the issue?

To solve this issue, there’s only one single solution: renaming the WordPress SQL table prefix.

You can do this using the Change Table Prefix plugin.

Or you can do it manually. In that case you need to rename all tables names using a tool like phpMyAdmin, reduce the table’s prefix, and update the prefix value in wp-config.php. When you’ve done this, deactivate WooCommerce and re-activate it. Don’t worry you won’t lose any data, and re-enabling WooCommerce should force it to create missing SQL tables.

Please create a backup of your database and of your site before doing such actions.

Did you find this article useful?

  • Server Recommendations

    The first step in setting up your WooCommerce-powered online store is to install WordPress and the WooCommerce plugin itself. But before doing so, you...

  • Installing WooCommerce

    If you have an existing site and want to install WooCommerce, using the WordPress Admin is the most straightforward option as it handles everything fo...

  • Uninstalling WooCommerce

    There are two things to understand when uninstalling or removing WooCommerce. If you deactivate and delete the plugin from WordPress, you...

  • Updating Woocommerce

    Updates to WooCommerce, Storefront, WordPress, and your extensions and payment gateways are a fact of life. Our team of developers are hard at wo...

  • Installed Database Tables

    WooCommerce installs some custom tables to store its data during install. More about tables installed: