Skip to content

Commit 3548632

Browse files
committed
Merge branch 'OFW-296' into release
2 parents 92d205c + ed2013c commit 3548632

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

admin/class-offers-for-woocommerce-admin.php

+7
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,13 @@ public function angelleye_ofwc_exclude_cpt_from_comments_clauses($clauses) {
899899
global $wpdb;
900900
$clauses['join'] = "JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID";
901901
$clauses['where'] .= $wpdb->prepare(" AND $wpdb->posts.post_type <> '%s'", 'woocommerce_offer');
902+
if (strpos($clauses['where'], 'wp_posts_to_exclude_reviews.post_type') !== false) {
903+
$clauses['where'] = str_replace(
904+
"{$wpdb->prefix}posts_to_exclude_reviews.post_type NOT IN ('product')",
905+
"1=1",
906+
$clauses['where']
907+
);
908+
}
902909
return $clauses;
903910
} else {
904911
return $clauses;

0 commit comments

Comments
 (0)