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.
This commit is contained in:
Mike Jolley 2017-06-29 11:29:54 +01:00
parent b999864fa1
commit ad48fd8069
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ class WC_Comments {
* @return string * @return string
*/ */
public static function exclude_order_comments_from_feed_where( $where ) { 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 * @return string
*/ */
public static function exclude_webhook_comments_from_feed_where( $where ) { 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' ";
} }
/** /**