diff --git a/includes/Emails/VendorProductReview.php b/includes/Emails/VendorProductReview.php index 8ae7f380c2..e3e72b9b24 100644 --- a/includes/Emails/VendorProductReview.php +++ b/includes/Emails/VendorProductReview.php @@ -95,6 +95,10 @@ public function trigger( $comment_id ) { } $comment = get_comment( $comment_id ); + if ( ! $comment ) { + // the comment does not exist + return; + } $product = wc_get_product( $comment->comment_post_ID ); if ( ! $product ) {