diff --git a/lib/sendgrid/class-sendgrid-translator.php b/lib/sendgrid/class-sendgrid-translator.php index 862d318..bbf25f1 100644 --- a/lib/sendgrid/class-sendgrid-translator.php +++ b/lib/sendgrid/class-sendgrid-translator.php @@ -261,7 +261,7 @@ private static function set_bccs_v3( foreach ( $email_v2->bcc as $index => $address ) { // Check if "bcc name" is set $bcc_name = null; - if ( self::is_valid_string( $email_v2->bccName[ $index ] ) ) { + if ( is_array($email_v2->bccName) && self::is_valid_string( $email_v2->bccName[ $index ] ) ) { $bcc_name = trim( $email_v2->bccName[ $index ] ); }