Skip to content

Instantly share code, notes, and snippets.

@robin-scott
Last active October 28, 2019 17:24
Show Gist options
  • Save robin-scott/cb297a299ebe8eb8b405e32230e3c013 to your computer and use it in GitHub Desktop.
Save robin-scott/cb297a299ebe8eb8b405e32230e3c013 to your computer and use it in GitHub Desktop.
Only use product tags in WooCommerce related products
// Remove categories and only use tags in WooCommerce related products - By Robin Scott of Silicon Dales see https://silicondales.com/tutorials/woocommerce/remove-categories-only-use-tags-related-products/
add_filter( 'woocommerce_product_related_posts_relate_by_category', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment