• Hello.
    I want to display the product image thumbnail in the email sent when purchasing the downloaded product.

    I want to display the product image thumbnail before the product name in the download table.

    I want to know how to display it in the download table. I know the following method ↓

    add_filter (‘woocommerce_email_order_items_args’, ‘iconic_email_order_items_args’, 10, 1);

    function iconic_email_order_items_args ($ args) {

    $ args [‘show_image’] = true;

    return $ args;

    }

    Please tell me how.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Remi Corson

    (@corsonr)

    Automattic Happiness Engineer

    Hi there,

    It seems that a snippet quite close to what’s you’re looking for is available here: https://www.cloudways.com/blog/add-product-images-skus-to-woocommerce-order-emails/

    There’s also a good read here:

    https://www.ads-software.com/support/topic/email-download-table-insert-thumbnail-image-instead-of-text/

    Finally please you can consider using custom templates as well. Basically a custom template allows you to override WooCommerce default files and use your own custom files instead. Here is a [quick tutorial](https://docs.woocommerce.com/document/template-structure/) that will explain you how to create your custom templates. Also, if some of your existing custom templates are outdated, I would suggest [updating them](https://docs.woocommerce.com/document/fix-outdated-templates-woocommerce/).

    WooCommerce comes with a number of front-end HTML templates as well as email templates. Instead of editing these files directly within the plugin (which is a very bad idea because once update the plugin and all of your changes will be lost!), you can copy them into your theme:

    1. In your theme directory, make a new folder called woocommerce.
    2. Navigate to the WooCommerce plugin directory and open the templates folder. The templates folder has a lot of subfolders with all of the different templates that WooCommerce uses.? Fortunately, the template file structure and naming in WooCommerce is easy to follow.
    3. In your newly created woocommerce folder, copy the template file that you want to edit. Remember to keep the directory structure the same here. If the template you want to edit is within a subfolder then remember to create that subfolder within your theme’s directory.
    4. Edit the file from within your woocommerce folder and save the changes.

    Thread Starter wpyoji

    (@wpyoji)

    thanks!

    I knew the page you told me.

    I searched a lot but couldn’t find a solution.

    Can you give me a solution?

    I want to display the product thumbnail image in the download product table.

    Thread Starter wpyoji

    (@wpyoji)

    I want to know how to edit child-theme / woocommerce / emails / email-downloads.php.

    What should I write on ●●●?

    ●●●<a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo wp_kses_post( $download['product_name'] ); ?></a>

    • This reply was modified 4 years, 11 months ago by wpyoji.
    Thread Starter wpyoji

    (@wpyoji)

    Can you help me?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add DownloadProduct images to WooCommerce order emails’ is closed to new replies.