woocommerce_single_product_image_thumbnail_html

The WooCommerce Product Hover Carousel woocommerce single product image thumbnail html hook.

Description

apply_filters( 'woocommerce_single_product_image_thumbnail_html', $sprintf, (unknown) $attachment_id, (unknown) $post_id, (unknown) $image_class ); 

Parameters (4)

0. $sprintf — Optional.
The sprintf.
1. $attachment_id (unknown)
The attachment id.
2. $post_id (unknown)
The post id.
3. $image_class (unknown)
The image class.

Usage

To run the hook, copy the example below.
  1. $sprintf = apply_filters( 'woocommerce_single_product_image_thumbnail_html', $sprintf, $attachment_id, $post_id, $image_class ); 
  2.  
  3. if ( !empty( $sprintf ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_single_product_image_thumbnail_html callback 
  2. function filter_woocommerce_single_product_image_thumbnail_html( $sprintf, $attachment_id, $post_id, $image_class ) { 
  3. // make filter magic happen here... 
  4. return $sprintf
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_single_product_image_thumbnail_html', 'filter_woocommerce_single_product_image_thumbnail_html', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_single_product_image_thumbnail_html', 'filter_woocommerce_single_product_image_thumbnail_html', 10, 4 ); 

Defined (1)

The filter is defined in the following location(s).

/hover-carousel.php  
  1. echo apply_filters('woocommerce_single_product_image_thumbnail_html', sprintf('<li><a data-href="%s" class="%s" title="%s">%s</a></li>', $image_link, $image_class, $image_title, $image), $attachment_id, $post->ID, $image_class);