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

WC_Order_Item_Product::get_item_downloads() WC 1.0

Get any associated downloadable files.

Это метод класса: WC_Order_Item_Product

Хуки из метода
Возвращает

Массив.

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

$WC_Order_Item_Product = new WC_Order_Item_Product();
$var = $WC_Order_Item_Product->get_item_downloads();

Код WC Order Item Product::get item downloads: woocommerce/includes/class-wc-order-item-product.php WC 3.7.0

<?php
public function get_item_downloads() {
	$files      = array();
	$product    = $this->get_product();
	$order      = $this->get_order();
	$product_id = $this->get_variation_id() ? $this->get_variation_id() : $this->get_product_id();
	$email_hash = function_exists( 'hash' ) ? hash( 'sha256', $order->get_billing_email() ) : sha1( $order->get_billing_email() );

	if ( $product && $order && $product->is_downloadable() && $order->is_download_permitted() ) {
		$data_store         = WC_Data_Store::load( 'customer-download' );
		$customer_downloads = $data_store->get_downloads(
			array(
				'user_email' => $order->get_billing_email(),
				'order_id'   => $order->get_id(),
				'product_id' => $product_id,
			)
		);
		foreach ( $customer_downloads as $customer_download ) {
			$download_id = $customer_download->get_download_id();

			if ( $product->has_file( $download_id ) ) {
				$file                  = $product->get_file( $download_id );
				$files[ $download_id ] = $file->get_data();
				$files[ $download_id ]['downloads_remaining'] = $customer_download->get_downloads_remaining();
				$files[ $download_id ]['access_expires']      = $customer_download->get_access_expires();
				$files[ $download_id ]['download_url']        = add_query_arg(
					array(
						'download_file' => $product_id,
						'order'         => $order->get_order_key(),
						'uid'           => $email_hash,
						'key'           => $download_id,
					),
					trailingslashit( home_url() )
				);
			}
		}
	}

	return apply_filters( 'woocommerce_get_item_downloads', $files, $this, $order );
}