Prevent ambiguous column error

This commit is contained in:
Paul van der Meijs 2014-02-24 11:47:19 +01:00 committed by Coen Jacobs
parent cb4031f0c3
commit 093fce6238
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;
}