Get Url file
-
Currently the url of the file is:
https://myhost.com/?attachment_id=847&download_file=5cb6534b0fd32&_wpnonce=ba84e0634f
how can I get the url of the file directly (I need it this way to be able to add a PDF viewer)
https://myhost.com/wp-content/uploads/2019/04/myfile.pdf
I have looked in:
public/class-woocommerce-product-attachment-public
$wcpoa_file_url_btn = '<a class="wcpoa_attachmentbtn" href="' . esc_url(get_permalink() . esc_attr($wcpoa_attachment_url_arg) . 'attachment_id=' . esc_attr($attachment_id) . '&download_file=' . esc_attr($wcpoa_attachments_id) . '&_wpnonce=' . esc_attr($nonce)) . '" rel="nofollow">' . __("Download", 'woocommerce-product-attachment') . '</a>'
- The topic ‘Get Url file’ is closed to new replies.