WooCommerce is a powerful e-commerce plugin for WordPress, but its configuration settings are annoyingly limited. Below are a few lines of code I’ve found useful in refining www.runeshirts.com:
Removing the price [range] for products on the “Shop” and category pages by entering the following code anywhere in the functions.php file:
1 | remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); |
Removing the star rating for products on the “Shop” and category pages (note: this will NOT remove the stars from the “Top Rated Products” widget) by entering the following code anywhere in the functions.php file:
1 | remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); |
Remove the gear icon (add to cart display) on products on the “Shop” and category pages by entering the following code anywhere in the functions.php file:
1 | remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); |
Have any other useful WooCommerce code? Post it in the comments below!