wordpress - Restrict Related Products by Product Categories Woocommerce -
i have done fair bit of searching on no avail.
my question wish narrow term woocommerce defines related product. uses categories & tags define related products, wish remove tags , link product categories. result of products in store same category defined related product. note not using subcategories.
can me out code need use achieve this?
thanks!
in abstract-wc-product.php
file in woocommerce/includes/abstracts/
folder remove following line (on line ~1154):
// tags $terms = wp_get_post_terms( $this->id, 'product_tag' ); foreach ( $terms $term ) { $tags_array[] = $term->term_id; }
removing above should work.
Comments
Post a Comment