Change Loop Thumbnail html in shop page Woocommerce

function loop_product_thumbnail() {
    // Remove product images from the shop loop
    remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
    // Adding something instead
    function wc_template_loop_product_replaced_thumb() {
        echo "Your text or Image ";
    }
    add_action( 'woocommerce_before_shop_loop_item_title', 'wc_template_loop_product_replaced_thumb', 10 );
}
add_action( 'woocommerce_init', 'loop_product_thumbnail');

Leave a Reply

Your email address will not be published. Required fields are marked *