You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 6, 2021. It is now read-only.
We have several lists in sendgrid and our blog newsletter signup adds users to one. When the user is already a contact (as a result of being on one of the other lists) the newsletter signup fails with the general error template/msg: "Something went wrong while trying to send information."
I've debugged this and it looks like the issue is with the static add_recipient method of the class Sendgrid_NLVX in the file class-snedgrid-nlvx.php. In particular this bit:
if ( ! isset( $recipient_response['persisted_recipients'] ) or ! isset( $recipient_response['persisted_recipients'][0] ) ) {
return false;
}
Since the api call returns unmodified_recipients=[0] when the email already exists as a contact, and persisted_recipients=[] this method is failing here.
In this case I guess we also need to fetch the recipient id from sendgrid for the existing contact/email and then we can proceed to add it to the correct list as per usual.
Thanks
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
We have several lists in sendgrid and our blog newsletter signup adds users to one. When the user is already a contact (as a result of being on one of the other lists) the newsletter signup fails with the general error template/msg: "Something went wrong while trying to send information."
I've debugged this and it looks like the issue is with the static
add_recipient
method of the classSendgrid_NLVX
in the fileclass-snedgrid-nlvx.php
. In particular this bit:Since the api call returns
unmodified_recipients=[0]
when the email already exists as a contact, andpersisted_recipients=[]
this method is failing here.In this case I guess we also need to fetch the recipient id from sendgrid for the existing contact/email and then we can proceed to add it to the correct list as per usual.
Thanks
The text was updated successfully, but these errors were encountered: