Fix: Download permissions not granted on order completion.

$downloads was being built from a function that tried to read from the permissions table and not from the correct post meta which it actually needed. This resulted in having to manually grant permissions for each order made.

Original symptom was download links not appearing on order completion screen or completion e-mail.
Pass index to woocommerce_save_product_variation
Merge pull request #3956 from atomworks/master

Fix: Download permissions not granted on order completion.
remove_ordering_args from .18
Merge branch 'master' of github.com:woothemes/woocommerce