Show all downloads regardless of file

Closes #10388
This commit is contained in:
Mike Jolley 2016-02-19 17:17:14 +00:00
parent fdddbff229
commit 1ee2b431a3
1 changed files with 0 additions and 9 deletions

View File

@ -404,8 +404,6 @@ function wc_get_customer_available_downloads( $customer_id ) {
", $customer_id, date( 'Y-m-d', current_time( 'timestamp' ) ) ) ), $customer_id );
if ( $results ) {
$looped_downloads = array();
foreach ( $results as $result ) {
if ( ! $order || $order->id != $result->order_id ) {
// new order
@ -438,13 +436,6 @@ function wc_get_customer_available_downloads( $customer_id ) {
$download_file = $_product->get_file( $result->download_id );
// Check if the file has been already added to the downloads list
if ( in_array( $download_file, $looped_downloads ) ) {
continue;
}
array_push( $looped_downloads, $download_file );
// Download name will be 'Product Name' for products with a single downloadable file, and 'Product Name - File X' for products with multiple files
$download_name = apply_filters(
'woocommerce_downloadable_product_name',