fixed wc_get_customer_available_downloads() query, closes #6057

This commit is contained in:
claudiosmweb 2014-08-19 14:50:27 -03:00 committed by Ninos Ego
parent e578ef2db4
commit 8f19fa1855
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ function wc_get_customer_available_downloads( $customer_id ) {
LEFT JOIN {$wpdb->posts} as posts ON permissions.order_id = posts.ID LEFT JOIN {$wpdb->posts} as posts ON permissions.order_id = posts.ID
WHERE user_id = %d WHERE user_id = %d
AND permissions.order_id > 0 AND permissions.order_id > 0
AND posts.post_status = 'publish' AND posts.post_status IN ( '" . implode( "','", array_keys( wc_get_order_statuses() ) ) . "' )
AND AND
( (
permissions.downloads_remaining > 0 permissions.downloads_remaining > 0