How can we improve WooCommerce?

Add Regenerate Download Permissions Button

Recently we had an issue where certain download permissions for customer disappeared and all customers were only able to see some of the download links, but one of them became invalid.

As we had over 16,000+ customers this affected, regenerating download permissions for each customer was not a valuable option. Would be great to have a regenerate download permissions for all completed orders in the WooCommerce tools area to fix this possible issue.

62 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Griffin shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

7 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Kim Townsend commented  ·   ·  Flag as inappropriate

    I have no idea what the date is on this, but it's still not a feature. I just moved to a new host and all my download permissions are gone. This is DESPERATELY needed.

  • Lisa commented  ·   ·  Flag as inappropriate

    This is an essential function needed! It is very common to make updates to digital products that sometimes have new file locations, therefore new links. I need my existing customers to access this new updated version of the product. And unless I individually regenerate download permissions for each customer, which is NOT a viable option, those existing customers simply can't access their order. Please include this as a bulk function, thank you!

  • Anonymous commented  ·   ·  Flag as inappropriate

    Add function in Woocommerce -> Status -> Tools -> Generate Download Permissions. Or even better, add that function to Product page (backend) which would loop through all the orders containing the product and then generates the download permissions again.

  • Anonymous commented  ·   ·  Flag as inappropriate

    I did find this whilst searching for a way to bulk assign downloadable permissions on StackOverflow

    $order = new WC_Order( $order_id );
    if ( sizeof( $order->get_items() ) > 0 )
    {
    foreach ( $order->get_items() as $item )
    {
    $_product = $order->get_product_from_item( $item );
    if ( $_product && $_product->exists() && $_product->is_downloadable() )
    {
    $downloads = $_product->get_files();
    foreach ( array_keys( $downloads ) as $download_id )
    {
    wc_downloadable_file_permission( $download_id, $item['variation_id'] > 0 ? $item['variation_id'] : $item['product_id'], $order, $item['qty'] );
    }
    }
    }
    }
    update_post_meta( $order_id, '_download_permissions_granted', 1 );

    If anyone knows how to make use of this or assign it to a function please let me know I would be grateful

  • Anonymous commented  ·   ·  Flag as inappropriate

    Badly needed. If you need to modify download limits or expiry dates for downloadable products or to add files to an existing product, it is currently impossible to do this for all users at once.

  • Frank commented  ·   ·  Flag as inappropriate

    A bulk regenerate Download permissions function would be great as if I want to add a download to a existing product this is not available for existing customers.

WooCommerce: Category - Core

Feedback and Knowledge Base