If it’s still relevant, you can add a class to the product thumbnail the following way.
function loop_product_custom_thumbnail() {
echo the_post_thumbnail('thumbnail', array('class' => 'your-class-name'));
}
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
add_action( 'woocommerce_before_shop_loop_item_title', 'loop_product_custom_thumbnail', 10 );
Related Posts:
- WooCommerce single products images doesn’t zoom on hover and doesn’t change clicking on gallery
- woocommerce image product add a class and data-src attributes
- Image is not displayed in overridden woocommerce email
- WordPress Twenty Seventeen header image size not responsive for mobile
- How to upload images from wordpress front-end (the first image must be thumbnail and the rest without first must be in gallery woocommerce product)
- How to delete 1000s of duplicated images in WordPress?
- Some images aren’t shown on wordpress after installation on host
- Woocommerce product image [closed]
- How do I make the product image smaller on a WooCommerce product page?
- Updating product image
- Images not uploading on product page of woocommercr
- How to solve `Error getting remote image` in woocommerce rest api script?
- Images not showing on site – Even though they are there
- Delete product image using WooCommerce API?
- Set Post Thumbnail to external URL
- Correct method of reducing the number of images created by WP and Woo together
- Titles with thumbnails in media library
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)
- Blurry product card image – rendered is 486×452 vs 300×279 in real image. Smaller versions being autocreated and served using srcset
- Export Woocomerce Image Product URL
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- How to display product price of the product in loop
- How to disable Woocommerce password recovery and use the default WordPress password reset page?
- Limit users to one active subscription in WooCommerce Subscriptions? [closed]
- Display WooCommerce size product attribute on shop page
- WooCommerce add_to_cart() with custom price [closed]
- Declaring custom woocommerce product type as virtual / downloadable only [closed]
- How to remove_action inside class [duplicate]
- Redirect if current user is logged out and current page is /my-account
- WooCommerce HTML after short description if product is in specific category
- How to get total count for each star rating?
- WooCommerce Apply Coupon to order AFTER taxes
- Rewriting Woocommerce Product Filters To URL Segments
- How to Change WooCommerce Variable product pricing by SKU or visible children id
- Auto update cart after quantity change
- echo product id and product_item_key in cart [closed]
- Redirect the single product page link to the shop page
- Is WooCommerce updates for WordPress necessary? [closed]
- How can I display *only* the child category of a product?
- How to implement Handling Fee like the Shipping on Cart and Checkout page on WooCommerce [closed]
- why featured product not updated in postmeta table in woocommerce?
- A mystery 300px image size
- Change Category Widget Dropdown List Select Name
- wooCommerce checkout page State / County (optional) validate not working
- How to display empty stars on products with woocommerce?
- WooCommerce – Multiple meta query not working
- WooCommerce limited role
- Skip WooCommerce 4.5.x onboarding with WP-CLI [closed]
- WooCommerce Cart URL bug
- WP_Error on attribute + term insert
- woocommerce breadcrumbs in theme [closed]
- Feed format for woocommerce [closed]
- Convert WordPress Woocomerce product to WordPress post
- How to set the meta description of a WooCommerce product as its primary category description?
- How to display a table below each product in product list/loop
- how to remove this image? [closed]
- Create a shortcode for native WooCommerce search form [closed]
- WooCommerce – Split Multiple Items into Individual Line Items
- Change “Select Options” label in button to “Buy Now!” in store page
- How to use Custom Field to display product brief description in shop page with Woocommerce?
- Woocommerce product import exports product with price rounded to integer? [closed]
- How to hook to function of woocommerce product export _regular_price?
- remove sale price after finished countdown in woocommerce
- Add “new” tag for existing products
- CallBack URL for payment gateway redirecting to homepage instead of executing callback function
- Display when items are in Woocommerce cart but hide when empty
- Printing product variation return array to string conversion error
- woocommerce deposit Form with AJAX and shortcode won’t update but add to previous output
- How to retrieve a Menu Name by Menu Location with ACF fields
- How to update permalink programmatically?
- Display shipping class in single product page woocommerce
- Is it ok to 301 redirect product-category pages to custom pages?
- ACF in WooCommerce mail template
- Woocommerce – Add custom email footer to specific email template
- WooCommerce related product – only show from primary category
- Woocommerce: Variable Product – get variation name
- Forgot password flow does not work, getting email with a link but after clicking link it’s not working
- Html code is not showing in woocommerce shop page on adding in header.php?
- I need to refresh the checkout page if someone changes the zip code
- add_filter not works in ajax
- How to skip woocommerce checkout after payment page? [closed]
- Product thumbnail size in catalog
- WordPress Migration
- how can i import the csv file in wordpress woocommerce.?
- some products free and some product is not free for shipping
- Importing Attributes in to Woocommerce
- Change wp-login.php? Problem with .htaccess password protection and multi user shop
- Conditional email recipient based off Shipping Method [closed]
- Save Woocomerce discount as percentage to database
- Woocommerce Shipping based on condition and cart value
- How to bypass Woocommerce checkout validation from the plugin? [closed]
- Category with description and thumbnail
- Custom product loop avoiding duplicates
- Woocommerce – Remove ‘Buy Product’ Button + Make Product Thumbnails Clickable
- Issue with Woocommerce and extra field in orders data
- Give auto discount to upsells products
- Making product image in woocommerce invoice linkable [closed]
- Woocommerce checkout column total too small can not get it wider [closed]
- I want to update shipping charge $0 for all Woocommeerce Subscription auto-renewal orders
- Conflict between Woocommerce Booking + Woocommerce Product Options [closed]