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
- How do I get my image for my product to not be blurry
- Woocommerce Gallery Image Caption: Use “caption” — not “alt tag”. Keep alt tag as is
- 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]
- 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
- 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
- Woo create order only after payment done
- Change Category Widget Dropdown List Select Name
- wooCommerce checkout page State / County (optional) validate not working
- WooCommerce – Multiple meta query not working
- WooCommerce limited role
- Skip WooCommerce 4.5.x onboarding with WP-CLI [closed]
- WP All Import manual Cron
- WooCommerce Cart URL bug
- WP_Error on attribute + term insert
- Feed format for woocommerce [closed]
- Convert WordPress Woocomerce product to WordPress post
- Have I got this IF Statement correct?
- WooCommerce Price Filter not working? [closed]
- Adding Buy Button to Blog Post (Woocommerce) [closed]
- How to replace WooCommerce Product Gallery Trigger icon using PHP/CSS? [closed]
- Adding Field in WooCommerce
- Woocommerce Sort by default variation price
- Add Name and SKU Main Product to Secondary Product to Cart
- Synchronise Renewals on existing subscriptions [closed]
- Add rewrite rule to make Woocommerce product category page seo friendly
- How to show the urls inside the simple product when the customer buys it?
- Custom template – query issues
- Sort downloads by most recently purchased first in my account WooCommerce [closed]
- How to add woocommerce products header title in woocommerce_breadcrumb hook to function.php
- Format decimals of get_price_html
- apply_filter and add_filter conflict
- Getting in an exception for get product detail by id in woocommerce REST api
- How to make wocommerce shop products same heigt
- Woocommerce Ajax add to cart redirect to homepage
- How to merge 2 accounts with same email address after merge of 2 woocommerce databases
- Temporary access to page with URL sent to email
- How to save a Woocomerce metabox input as a metadata field
- How do you programatically add a booking item to the cart?
- populating extra field with woocommerce categories
- Woocommerce Shop Manager Capabilities
- customize src attribute in woocommerce single product image
- How to tell woocommerce slider to use thumbnails
- Add customer name to woocommerce email-header.php heading
- woocommerce sort by dropdown styling
- Mysql query – amount spent by customer
- How Do I Access Parameters Emitted by an Action?
- bulk media crop for featured images
- Users credentials and syncing from third party with WooCommerce
- Create templates from attributes for categories
- How do I get slug of term by his name?
- Include customer details in woocommerce 3rd part plugin email
- how to add a page to a plugin?
- Membership website with discount on scheduled appointment
- Woocommerce: how to make only certain products shippable?
- Customer email notification upon order update in woocommerce
- Set single product image (main image) and archive thumbnail image as different from each other in Woocommerce
- WooCommerce Simple Auction and delayed capture
- ACF Create Array of All Woocommerce Product IDs with a Checkbox ticked
- How to display customer email within the meta order data box
- Bulk delete ‘Global Attributes’ in WooCommerce via WP-CLI?
- Checkout page not loading on my ecommerce website
- WooCommerce: expiring date for products (and on sale some days before)
- How to display woo commerce shipping_method on the product page
- Product data field for Woo Commerce is blank?