Forked from growdev/gist:4074021
Created
October 22, 2016 15:04
Star
You must be signed in to star a gist
WooCommerce - Remove the "Related Products" section from a template by removing the related posts query arguments.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment