WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Customer_Download_Data_Store::get_downloads_for_customer() public WC 1.0

Get a customers downloads.

{} Это метод класса: WC_Customer_Download_Data_Store{}

Хуков нет.

Возвращает

Массив.

Использование

$WC_Customer_Download_Data_Store = new WC_Customer_Download_Data_Store();
$WC_Customer_Download_Data_Store->get_downloads_for_customer( $customer_id );
$customer_id(число) (обязательный)
Customer ID.

Код WC_Customer_Download_Data_Store::get_downloads_for_customer() WC 4.7.0

<?php
public function get_downloads_for_customer( $customer_id ) {
	global $wpdb;

	return $wpdb->get_results(
		$wpdb->prepare(
			"SELECT * FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions as permissions
			WHERE user_id = %d
			AND permissions.order_id > 0
			AND
				(
					permissions.downloads_remaining > 0
					OR permissions.downloads_remaining = ''
				)
			AND
				(
					permissions.access_expires IS NULL
					OR permissions.access_expires >= %s
					OR permissions.access_expires = '0000-00-00 00:00:00'
				)
			ORDER BY permissions.order_id, permissions.product_id, permissions.permission_id;",
			$customer_id,
			date( 'Y-m-d', current_time( 'timestamp' ) )
		)
	);
}