Missing argument 3 for Ctct\Services\ContactService::updateContact()
I'm trying to use the api from github. I've added the src folder to my theme folder in wordpress and I'm using the addOrUpdateContact.php, but I'm getting an error message:
Warning: Missing argument 3 for Ctct\Services\ContactService::updateContact(), called in /home/sites/mysite/public_html/informedluxury/wp-content/themes/informedluxury/templates/template_feature_contact_form.php on line 70 and defined in /home/sites/mysite/public_html/informedluxury/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ContactService.php on line 145 Notice: Undefined variable: actionByContact in /home/sites/mysite/public_html/informedluxury/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ContactService.php on line 147
Re: Missing argument 3 for Ctct\Services\ContactService::updateContact()
Is it possible for you to provide a snippet of code from your theme, specifically in the template_feature_contact_form.php file around line 70 where the error is?
I suspect that the problem is because on the line of code where you're calling the updateContact() method, you're missing the third parameter that determines if the action being taken is initiated by the contact or by the account owner. If the action is being taken by the contact (a signup form for example), then that third parameter should be set as true. If the action is taken by the account owner (updating a name in a CRM for example), then the parameter should be set as false.