From ad48fd806943fe43a06c15d4da63db8a6736aed0 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 29 Jun 2017 11:29:54 +0100 Subject: [PATCH] Comment feed where clauses should be appended Applies to both exclude_order_comments_from_feed_where and exclude_webhook_comments_from_feed_where They need to append the additonal where clause to avoid SQL errors on the feed URL. --- includes/class-wc-comments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-comments.php b/includes/class-wc-comments.php index d1e02c4b93c..c28f73165ff 100644 --- a/includes/class-wc-comments.php +++ b/includes/class-wc-comments.php @@ -97,7 +97,7 @@ class WC_Comments { * @return string */ public static function exclude_order_comments_from_feed_where( $where ) { - return ( $where ? ' AND ' : '' ) . " comment_type != 'order_note' "; + return $where . ( $where ? ' AND ' : '' ) . " comment_type != 'order_note' "; } /** @@ -125,7 +125,7 @@ class WC_Comments { * @return string */ public static function exclude_webhook_comments_from_feed_where( $where ) { - return ( $where ? ' AND ' : '' ) . " comment_type != 'webhook_delivery' "; + return $where . ( $where ? ' AND ' : '' ) . " comment_type != 'webhook_delivery' "; } /**