woothemes/woocommerce — pull request #5728 by darkrain (2014-06-24 06:15:10+00:00)
Title: bugfix in get_related() - return trash posts

Right now i use this fix
```
add_filter( 'woocommerce_product_related_posts_query', 'related_products_fix_query_brackets' );

function related_products_fix_query_brackets( $query )
{
$query['where'] = preg_replace
(
"/\( tt.taxonomy = 'product_cat' AND t.term_id IN \([\s\S]+?\) \) OR \( tt.taxonomy = 'product_tag' AND t.term_id IN \([\s\S]+?\) \) AND p.ID NOT IN \([\s\S]+?\)/",
'( $0 )',
$query['where']
);
return $query;
}
```