WooCommerce 2.1.9 cheatsheet – single product page

How To Remove Related Products

Add the following code to your theme’s functions.php

//remove related products from single product page
remove_action ( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);

How To Remove Price

Add the following code to your theme’s functions.php

//remove price from single product page
remove_action ( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);

How To Remove “Production Description” Heading in Description Tab

 * remove "Production Description" heading under description tab in 
 * single product page
function woo_product_description_heading() {
    return '';

How To Make The Thumbnail Images Uniform Without Cropping The Images

Add this code to your theme’s functions.php. This will insert a div tag before each thumbnail image.

Modify the CSS (assuming you are tweaking the default WooCommerce stylesheet) to:

  1. get rid of the box shadow on the image tag
  2. make the image’s width = auto
  3. make the image’s margin = auto
  4. give the imagewrapper fixed width and height
  5. add boxshadow to the imagewrapper (if you want the same shadow look)

Here is an example of the CSS code:

.woocommerce .related ul li.product .thumbnails .imagewrapper{
width: 150px;
height: 150px;
display: block;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.3);
-webkit-box-shadow: 0 1px 2px 0 rgba(0,0,0,0.3);

.woocommerce .related ul li.product .thumbnails .imagewrapper img{
width: auto !important;
box-shadow: none !important;
margin: auto;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.