• Resolved albenaabigail

    (@albenaabigail)


    Hi, on our website https://touchmy.hair/hair-lamination we are using te email template customizer. The problem is that when you make an order in the email you get 2 images – one is the featured image of the product and the other one is the variation image if the product has variations. If the product is simple you get 2 identical images. Can you please take a look?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    Thank you for reaching out to us.

    We suspect a conflict issue with a third-party plugin on your site. Please utilize our self-service guide to identify which generates this duplicated image.

    Best regards.

    Thread Starter albenaabigail

    (@albenaabigail)

    Hi! We found that a piece of code that is showing the image on the thank you page is causing the issue. Can you please give us a hand how to modify the code so to make it work with the plugin?
    
    
    // Show Product Image @ Order-Pay Page
    
    add_filter( 'woocommerce_order_item_name', 'ts_product_image_on_order_pay', 10, 3 );
    
    function ts_product_image_on_order_pay( $name, $item, $extra ) {
    
    ? ? /* Return if not checkout page */
    
    ? ? if ( ! is_checkout() ) {
    
    ? ? ? ? return $name;
    
    ? ? }
    
    ? ? $product_id = $item->get_product_id();
    
    ? ? /* Get product object */
    
    ? ? $_product = wc_get_product( $product_id );
    
    ? ? /* Get product thumbnail */
    
    ? ? $thumbnail = $_product->get_image();
    
    ? ? /* Add wrapper to image and add some css */
    
    ? ? $image = '<div class="ts-product-image" style="width: 50px; height: 50px; display: inline-block; padding-right: 7px; vertical-align: middle;">'
    
    ? ? ? ? ? ? ? ? . $thumbnail .
    
    ? ? ? ? ? ? '</div>';
    
    ? ? /* Prepend image to name and return it */
    
    ? ? return $image . $name;
    
    }
    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    We are afraid that we are unable to support custom code that does not belong to our plugin. Please reach out to the author of the plugin to which this piece of code belongs for assistance.

    If the code is indeed part of our plugin, we will assess it and address it within the scope of our support capabilities. Thank you for your understanding.

    Best regards.

    Thread Starter albenaabigail

    (@albenaabigail)

    Thanks for your answer.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image dublication in emails’ is closed to new replies.