Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2736546
Custom Thumbnail Image
Closed

Comments

  • Jeremy started the conversation

    Hey there,

    We're using a custom image field instead of the default WooCommerce featured image for our products. Is there a way to display this custom image on the compare chart (instead of the default featured image)?

    We have other custom text fields for our products and those show up fine using the Custom Fields option but I can't figure out how to show these images.

    Thanks!

  •  767
    Janilyn replied

    Hi Jeremy,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  • Jeremy replied

    Great, I'll stand by. Thanks Janilyn!

  •  153
    Henry replied

    Hi Jeremy,

    You can use fillter: wooscp_product_image;

    EX:

    add_filter('wooscp_product_image','custom_wooscp_product_image',10,2);
    function custom_wooscp_product_image($image,$product){
         return '<img src="LINK_IMAGE">';
    }

    Best regards,
    Henry N.

  • Jeremy replied

    Brilliant, exactly what I needed. Thanks Triston!

  • Jeremy replied

    Sorry for the follow up on a solved ticket. Trying that filter only replaces the main image, not the images in the comparison bar. 

    I'm also having a little bit of trouble in that I'm actually using a custom field image (not the featured image) but the comparison plugin keeps pulling the WC placeholder image. I did add a filter to my functions.php to swap this on the WC pages but I'm not sure with the comparison plugin is still getting the placeholder.

    Alternatively, another way I could solve this is too include the custom image field in the plugin's custom field settings but I'd need to have a way to wrap that field in an <img> tag, not sure if that's possible.

    Thanks for any info!