miriam-m
11/14/2012 - 7:00 PM

WooCommerce - Remove the "Related Products" section from a template by removing the related posts query arguments.

WooCommerce - Remove the "Related Products" section from a template by removing the related posts query arguments.

<?php
/*
 * wc_remove_related_products
 * 
 * Clear the query arguments for related products so none show.
 * Add this code to your theme functions.php file.  
 */
function wc_remove_related_products( $args ) {
	return array();
}
add_filter('woocommerce_related_products_args','wc_remove_related_products', 10);