Support » Plugin: WooCommerce » Filters to product images and thumbnails not work

  • Resolved prolab

    (@prolab)


    I added a filter “woocommerce_single_product_image_thumbnail_html” to change the image size of the product, but it does not work, and the filter “post_thumbnail_size” works, but that’s not what I need. Here is my code:

    add_filter( 'woocommerce_single_product_image_thumbnail_html', 'motomir68_image_prod_large', 1 );//not work
    
    add_filter( 'post_thumbnail_size', 'motomir68_image_prod_large', 1 );//work
    
    function motomir68_image_prod_large(){
    	return 'large';
    }

    How can I get the filter “woocommerce_single_product_image_thumbnail_html”?

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Roy Ho

    (@splashingpixelscom)

    You’re not using the correct filter. The one you tried to use is for outputting HTML which includes the anchor tag and everything. What you want is this filter:

    single_product_large_thumbnail_size

    Thank you! My mistake.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filters to product images and thumbnails not work’ is closed to new replies.