woocommerce_single_product_image_thumbnail_html

The WordPress Core woocommerce single product image thumbnail html hook.

Description

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

Parameters (2)

0. $sprintf (unknown) => sprintf('
  • %s
  • ', $image)
    The sprintf.
    1. $post_id (unknown)
    The post id.

    Usage

    To run the hook, copy the example below.
    1. $sprintf = apply_filters( 'woocommerce_single_product_image_thumbnail_html', $sprintf, $post_id ); 
    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, $post_id ) { 
    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, 2 ); 
    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, 2 ); 

    Defined (2)

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

    /woocommerce/single-product/product-thumbnails.php  
    1. echo apply_filters('woocommerce_single_product_image_thumbnail_html', sprintf('<li>%s</li>', $image), $post->ID); 
    1. echo apply_filters('woocommerce_single_product_image_thumbnail_html', sprintf('<li>%s</li>', $image), $attachment_id, $post->ID, $image_class);