• Resolved avobelle

    (@avobelle)


    Hi guys,

    I recently started using this plugin and am having an issue with the order details. For some reason, the product title is displayed twice, right next to each other:
    https://i.postimg.cc/vTDhZP2p/Screenshot-2020-10-10-101503.png

    and the code looks like this:

    <div class="woocommerce-thank-you-page-order_details__product-title woocommerce-thank-you-page-order_details-title">
    Product name
      <div>
        Product name <strong class="product-quantity">× 1</strong>                                                                            
      </div>
    </div>

    Any idea where this is coming from?

    • This topic was modified 4 years, 5 months ago by avobelle.
    • This topic was modified 4 years, 5 months ago by avobelle.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter avobelle

    (@avobelle)

    Hi guys,

    Unfortunately, I am still experiencing this issue. Any idea where that is coming from?

    Hi,

    Please go to your Theme Editor and add this code blok to function.php file:

    `add_filter(‘woo_thank_you_page_order_item_image’,function ($result, $item, $is_visible){
    if (!$is_visible && $product = $item->get_product()){
    $result = sprintf( ‘<div><a href=”%s” class=”%s”><img class=”%s” src=”%s”></a></div>’,
    ‘#’,
    ‘woocommerce-thank-you-page-order-item-image-wrap’,
    ‘woocommerce-thank-you-page-order-item-image’,
    wp_get_attachment_thumb_url( $product->get_image_id() ) );
    }
    return $result;
    },10,3);`

    • This reply was modified 4 years, 5 months ago by rosenguyen.
    Thread Starter avobelle

    (@avobelle)

    Hi,

    I have added this the following code snippet at the very end of my functions.php (had to adjust the quotes because I was getting an error from wordpress):

    add_filter(‘woo_thank_you_page_order_item_image’,function ($result, $item, $is_visible){
    if (!$is_visible && $product = $item->get_product()){
    $result = sprintf("<div><a href='%s' class='%s'><img class='%s' src='%s'></a></div>",
    "#",
    "woocommerce-thank-you-page-order-item-image-wrap",
    "woocommerce-thank-you-page-order-item-image",
    wp_get_attachment_thumb_url( $product->get_image_id() ) );
    }
    return $result;
    },10,3);

    Unfortunately, the code isn’t doing anything, and I am still getting the duplicate product name.

    Any ideas?

    Thread Starter avobelle

    (@avobelle)

    Hi, I don’t mean to rush you or anything – just in case you might have overlooked my message. Any ideas? ??

    in your case, please contact us via [email protected], we will help you to check it.

    Thread Starter avobelle

    (@avobelle)

    So, i just figured out, that the issue seems to be on my end!

    As the product is not final yet, it is currently in Draft status. As soon as I changed it to live, the second mention of the product name disappeared and the remaining one turned into a hyperlink. So all good and no need for the code above ??

    Thanks for the support!

    Hi,

    It’s good news, thank you for your confirmation.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Product title twice in order details’ is closed to new replies.