Prevent ambiguous column error

This commit is contained in:
Paul van der Meijs 2014-02-24 11:47:19 +01:00
parent 7b639d45c7
commit 7daada95f9
1 changed files with 2 additions and 1 deletions

View File

@ -250,7 +250,8 @@ class WC_Query {
* @return string
*/
public function exclude_protected_products( $where ) {
$where .= " AND post_password = ''";
global $wpdb;
$where .= " AND {$wpdb->posts}.post_password = ''";
return $where;
}