WPIntell

Source evidence

Warning: Invalid argument supplied for foreach()

Help Scout integration for Easy Digital Downloads · support · 2021-08-23T23:07:00+00:00

mixedsentiment
highseverity
0.95relevance
6replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 32 rows with source links

12.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
joshcummingsdesign resolved
Hello, We are running EDD Helpscout version 2.1 and we are getting the following warning in Sentry: Warning: Invalid argument supplied for foreach() /wp-content/plugins/edd-helpscout/includes/class-endpoint.php in EDD\HelpScout\Endpoint::get_edd_customers at line 134 This happens when a POST request is made to /edd-helpscout-api/customer_info Thank you for your help. The page I need help with: [ log in to see the link] Hi joshcummingsdesign, thanks for reaching out. All three errors you reported indicate, that customer emails are missing. The plugin should not even come to the position in the code when there is no email found, so I am a bit clueless. We are running EDD Help Scout on our site with a lot of requests and never saw that error. Does the App in Help Scout work and returns client data or is that completely broken? Are you using any filters from the plugin, like edd_helpscout_customer_emails ? Are you using the latest versions of all EDD plugins? Thanks, Thomas Hello Thomas, Thanks for your quick reply. We are seeing the customer data in the body of the request from Help Scout. Some of the requests, however, are missing the email address in the POST body. They all have the customer ID. It seems as though it’s possible for Help Scout to not send the email in the POST body. Is this normal? If so, there should be a check for that somewhere to prevent this exception from being thrown. Thank you, Josh This reply was modified 4 years, 9 months ago by joshcummingsdesign . This reply was modified 4 years, 9 months ago by joshcummingsdesign . Hi Josh, thanks for your reply. > Is this normal? I don’t know. It doesn’t happen on our installation. Help Scout’s documentation is missing a few information on when certain fields are used. I created an untested version with a potential fix. You can download it here . As I said, untested, since I cannot reproduce the error message. If you are curious, you find the changes here . Let me know if this works Thomas Hi Thomas, Thanks. I’ll test these changes out and report back once I’ve had some time to test them. Thank you so much! – Josh Hi Thomas, Since using the updated version you provided, we have not seen this error. I think it is safe to merge this change. Thanks, and all the best. – Josh Hi Josh, thanks for letting me know. I will prepare that code for the next update then. Thomas

Comments

6 shown
Thomas Maier 2021-08-24T18:09:00+00:00

Hi joshcummingsdesign, thanks for reaching out. All three errors you reported indicate, that customer emails are missing. The plugin should not even come to the position in the code when there is no email found, so I am a bit clueless. We are running EDD Help Scout on our site with a lot of requests and never saw that error. Does the App in Help Scout work and returns client data or is that completely broken? Are you using any filters from the plugin, like edd_helpscout_customer_emails ? Are you using the latest versions of all EDD plugins? Thanks, Thomas

joshcummingsdesign 2021-08-24T23:28:00+00:00

Hello Thomas, Thanks for your quick reply. We are seeing the customer data in the body of the request from Help Scout. Some of the requests, however, are missing the email address in the POST body. They all have the customer ID. It seems as though it’s possible for Help Scout to not send the email in the POST body. Is this normal? If so, there should be a check for that somewhere to prevent this exception from being thrown. Thank you, Josh This reply was modified 4 years, 9 months ago by joshcummingsdesign . This reply was modified 4 years, 9 months ago by joshcummingsdesign .

Thomas Maier 2021-08-25T14:22:00+00:00

Hi Josh, thanks for your reply. > Is this normal? I don’t know. It doesn’t happen on our installation. Help Scout’s documentation is missing a few information on when certain fields are used. I created an untested version with a potential fix. You can download it here . As I said, untested, since I cannot reproduce the error message. If you are curious, you find the changes here . Let me know if this works Thomas

joshcummingsdesign 2021-08-30T19:17:00+00:00

Hi Thomas, Thanks. I’ll test these changes out and report back once I’ve had some time to test them. Thank you so much! – Josh

joshcummingsdesign 2021-09-07T21:37:00+00:00

Hi Thomas, Since using the updated version you provided, we have not seen this error. I think it is safe to merge this change. Thanks, and all the best. – Josh

Thomas Maier 2021-09-10T09:05:00+00:00

Hi Josh, thanks for letting me know. I will prepare that code for the next update then. Thomas