WC_Order_Item_Product::get_item_download_url( int $download_id )
Get the Download URL.
Description Description
Parameters Parameters
- $download_id
-
(Required) Download ID.
Return Return
(string)
Source Source
File: includes/class-wc-order-item-product.php
public function get_item_download_url( $download_id ) {
$order = $this->get_order();
return $order ? add_query_arg(
array(
'download_file' => $this->get_variation_id() ? $this->get_variation_id() : $this->get_product_id(),
'order' => $order->get_order_key(),
'email' => rawurlencode( $order->get_billing_email() ),
'key' => $download_id,
),
trailingslashit( home_url() )
) : '';
}