How to Remove Product Image Placeholder In WooCommerce

WooCommerce Remove Product Image PlaceholderIf you are looking for quick way to remove product image placeholder in WooCommerce, this is a quick guide to help you get rid of the product image placeholder in the single product page. This image placeholder is placed by a default WooCommerce function and we can override this function using a filter hook as I will illustrate shortly.

WooCommerce Remove Product Image Placeholder

Ideally the WooCommerce image placeholder is added to the product page when you do not add the featured image on the product post as you publish the product.

In the back end if you do now add the image as shown on the screenshot below.

woocommerce remove product image placeholder _

This will result in the placement of the WooCommerce image placeholder in the place of the image when the content is published on the front end as shown in the screenshot below:

woocommerce remove product image placeholder

WooCommerce Remove Product Image Placeholder

To remove product image placeholder in the WooCommerce product page, follow the following steps :

  1.  Access your child theme functions.php  file and ensure you create  backup of this file. If you do not have a child theme its a good idea to start by learning how to create child theme in WooCommerce Storefront theme.
  2. Add the following code snippet to the child theme functions.php file to remove product image placeholder.

[php]
//WooCommerce Remove Product Image Placeholder
remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );
[/php]

You will also need to remove the sales badge on image placeholder as well using the following code snippet:

[php]
// Remove sale badge from product image placeholder
remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_sale_flash’, 10 );
[/php]

As you can see on the image below these two code snippets will help you to remove single product page image placeholder.

woocommerce remove product image placeholder

Conclusion

In this quick tutorial, we have outlined the best way to remove product image placeholder from the single product page. I hope this quick solution is useful for your needs and you can now remove the image placeholder. In the next tutorial, I will share with you how you can change the WooCommerce image placeholder to your custom  image placeholder. If you need more help from WooCommerce developer or WooCommerce expert, feel free to get in touch with me.

Similar Articles

  1. WooCommerce Redirect After Logout [Ultimate Guide]
  2. How to Turn off Next Product Tabs In WooCommerce Storefront

 

 

 

Comments are closed.