justyy
justyy

Reputation: 6041

woocommerce shop single product image not shown

I have tried the solution from a couple of posts, but none of them are working:

here is the link to the woocommerce single product page https://happyukgo.com/product/aptamilfirstmilk/

It used to work until I upgrade woocommerce, theme, and wordpress (I don't know which one causes this).

any hints will be appreciated. thanks

Upvotes: 0

Views: 205

Answers (1)

justyy
justyy

Reputation: 6041

Finally, i found out it is the following function that removes the feature image display:

function my_post_image_html( $html, $post_id, $post_image_id ) {
  if(is_single()) {
    return '';
  } 
  return $html;
}

add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );

Removing that from the functions.php brings back the image.

Upvotes: 1

Related Questions