How to show Related Products by Product Categories only in Woocommerce

In the  abstract-wc-product.php file in the woocommerce/includes/abstracts/ folder remove the following line

// Get tags
$terms = wp_get_post_terms( $this->id, 'product_tag' );
foreach ( $terms as $term ) {
    $tags_array[] = $term->term_id;
}


Visit Our Online Store: http://devitems.com/