Looks like you are using the infusionsoft php library from github and probably just updated it. The current version includes the REST api which is defaulted to instead of the older XML-RPC api, see this part in the readme: https://github.com/infusionsoft/infusionsoft-php#breaking-change
Basically, you have to update that line to the following, i.e. adding “(‘xml’)” to the ‘contacts’ object:
$user_id = $infusionsoft->contacts('xml')->addWithDupCheck($contact, 'Email');
You will have to do this anywhere that uses the older XML-RPC part of the library, so any $infusionsoft->contacts->… calls will need to be updated, as well as any orders or products calls (again, see the readme link for details).