• Resolved NF

    (@nanasflowers)


    Hello,

    SG Optimizer is causing the following code to duplicate the product thumbnail at checkout:

    add_filter( 'woocommerce_cart_item_name', 'jfs_checkout_show_product_thumbnail', 10, 2 );
    function jfs_checkout_show_product_thumbnail( $name, $cart_item ) {
        if ( ! is_checkout() ) return $name;
        $thumbnail = '<span class="product-name__thumbnail" style="float: left; padding-right: 15px">' . get_the_post_thumbnail( $cart_item['product_id'], array( 60, 120 ) ) . '</span>';
        return $thumbnail . '<span class="product-name__text">' . $name . '</span>';
    }

    Disabling SG Optimizer resolves the issue

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey @nanasflowers

    We are unable to reproduce the issue with the provided snippet.

    Would it be possible to provide your site URL, so we can check what is causing the issue?

    Regards,
    Stanimir

    Thread Starter NF

    (@nanasflowers)

    Sure, whats your support email?

    Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Hello @nanasflowers,

    We should keep the communication in this thread. In case you do not want to add your website URL in the forum, you can open a ticket in your SiteGround User Area and update us with its number.

    We are looking forward to your update.

    Best Regards,
    Elena

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Marking as resolved since there isn’t much we can do about it without information.

    Thread Starter NF

    (@nanasflowers)

    Hello,

    Sorry for the delay I have been out of office.

    Ticket number is: 4125582

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Duplicate Product Thumbnail’ is closed to new replies.