• Resolved s1fox

    (@s1fox)


    Hello,

    I’m using the “Woocommerce Import Pro” and saw that there is “Download & Import Attachments” field which can be used to import additional files to the product. But how to show that attachment or attachment URL to the product description?

    I tried with the wp_get_attachment_url() function, but something is wrong and not showing the attachment URL to the product description.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you show the file you’re trying to import and specify where the attachment URLs are?

    Since you have the pro version of the plugin, you can get expedited support on the website – https://www.wpallimport.com/support/

    Thread Starter s1fox

    (@s1fox)

    I tried with different import files and the result are the same, for example the CSV file contains row with PDF URL, which successfully uploads to the product attachments, but how to show that attachment or attachment URL (example.com/wp-content/uploads/2022/02/7376494337) to the product description.

    The file that I’m trying to import: CSV, trying to attach column “CertPDFURL”.

    Hi @s1fox

    To display the “CertPDFURL” in the WooCommerce description, you can use the shortcode {certpdfurl[1]}

    If you’d like to hyperlink text to the URL, you can use a code like this:
    <a href="https://{certpdfurl[1]}">View PDF</a>

    Example: https://i.imgur.com/B3K1QGN.png

    • This reply was modified 3 years, 1 month ago by Aakash.
    Thread Starter s1fox

    (@s1fox)

    Hi @aakash8

    Thank you for the provided answer but not that is the main goal.

    I want to upload pdf to the product attachments and then to provide as URL (forwarding to the attached file) to the product description.

    Plugin Author WP All Import

    (@wpallimport)

    Hi @s1fox,

    Since WP All Import only imports data to the database (we don’t control the display of it), you’d have to write custom code to display the attached PDF links in the product description. For example, if you wanted to use a shortcode, there’s a workaround here that you can modify to fit your use case: https://gist.github.com/214592b808bb6a1e8293386b5dae190c.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to show attachment URL?’ is closed to new replies.