Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • The other option for fixing this problem, if it’s the problem you are having, is to add the permission_id column to your (prefix)_woocommerce_downloadable_product_permissions manually. I’m waiting to hear back from WooCommerce on the structure of that column, but my guess is that it’s a column of integers with a default of 0. So you can manually create the column, but you need to fill in a 0 value by default for every record; if you leave it as null, you’ll still have this problem.

    Hey everyone,

    So I fixed this problem on our site last night, after going back and forth with WooCommerce Support for a couple of weeks. In the end, I was able to solve it for us with a bit of investigation and tinkering, so I wanted to share this in case it helps anyone else. I’ve already communicated with WooCommerce that my fix is not the real fix and that we need to find out why this failed to begin with and it needs to be fixed on WooCommerce’s end, or it could affect many of their users.

    In WooCommerce 2.1.x, they added the ability for a digital download product to have more than one file. In 2.0.x and earlier, it could only have one file. To accomplish this, the query that looks up the download links and adds them to the emails now looks for a new column called permission_id and orders the download links by it. In our case, the permission_id column was not in our (prefix)_woocommerce_downloadable_product_permissions table. Because that column wasn’t there, mySQL was returning an error on the query and no download links appeared in the email.

    To see if this is the problem you are having, go take a look at your (prefix)_woocommerce_downloadable_product_permissions table (using mySQL Workbench, phpmyadmin, or something similar). If you don’t have a permission_id column in your table, that’s probably why your email download links are missing.

    To fix it (for now), open woocommerce\includes\class-wc-order.php in your wordpress directory. Find the function get_item_downloads. In that function, you’ll see a SQL query that ends with the line ORDER BY permission_id. Remove that line. As soon as you do that, test your digital download emails again. You should see your links.

    I’m guessing that WooCommerce 2.1.x is supposed to modify that table to add the column, but for whatever reason, it failed to do so on our install and did not return any error messages. I’m trying to work with WooCommerce Support to track this problem down, because our set-up here is not that unusual and I’m sure this is affecting other customers.

    Just tested and unchecking Virtual for the downloadable product did not fix the issue with the missing download link. And as I suspected, unchecking Virtual also put back the shipping options, which doesn’t make much sense for a downloadable product.

    I’ll have to do some more testing today with disabling various plugins, but some of our plugins are pretty critical to the operation of our WooCommerce site.

    I didn’t consider that either. I thought the Virtual option was what determined that it didn’t have shipping details. But it would make sense for Downloadable to include that too.

    Any updates on this? I had not updated WordPress or WooCommerce in months and then a few weeks ago I updated to WordPress 3.8.3 and WooCommerce 2.1.7. After that update, downloadable product links stopped appearing in the emails sent to customers once their order was complete.

    I did find a few links with people having similar issues. In some cases it appears it can be caused by a database prefix being too long (http://wisdmlabs.com/blog/solved-woocommerce-download-link-showing/). In other cases, it looks like it might have something to do with the way downloadable files are stored:

    http://wordpress.org/support/topic/downloadable-products-after-21-update

    http://wedevs.com/support/topic/woo_files-not-updating-showing-in-back-end/

Viewing 5 replies - 1 through 5 (of 5 total)