Reply To: GetResponse Integration problem

Home Forums Quform WordPress GetResponse Integration problem Reply To: GetResponse Integration problem

#31579
BlueWind
Participant

This is how look like my ‘quform-getresponse.php ‘ file.

<?php

/*
* Plugin Name: Quform GetResponse Integration
* Description: Add contacts to GetResponse from Quform forms.
* Version: 1.0
*/

add_filter(‘quform_post_process_1’, function (array $result, Quform_Form $form)
{
if (!class_exists(‘GetResponse’)) {
require_once dirname(__FILE__) . ‘/GetResponseAPI3.class.php’;
}

$getresponse = new GetResponse(‘myapikey’);

try {
$result = $getresponse->addContact(array(
‘name’ => $form->getValueText(‘quform_1_3′),
’email’ => $form->getValue(‘quform_1_4’),
‘campaign’ => array(
‘campaignId’ => ‘BX3mx’
),
‘ipAddress’ => Quform::getClientIp()
));
} catch (Exception $e) {
if (defined(‘WP_DEBUG’) && WP_DEBUG) {
Quform::log($e);
}
}

return $result;
}, 10, 2);

Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy