WC_Order_Item_Product::get_item_download_url()
Get the Download URL.
Метод класса: WC_Order_Item_Product{}
Хуков нет.
Возвращает
Строку
.
Использование
$WC_Order_Item_Product = new WC_Order_Item_Product(); $WC_Order_Item_Product->get_item_download_url( $download_id );
- $download_id(int) (обязательный)
- Download ID.
Код WC_Order_Item_Product::get_item_download_url() WC Order Item Product::get item download url WC 8.7.0
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() ) ) : ''; }