optout

[insert_php] // Pull Opt out Parameters for GET request, and submit for processing

global $wp_version;
$args = array(
‘timeout’ => 5,
‘redirection’ => 5,
‘httpversion’ => ‘1.0’,
‘user-agent’ => ‘WordPress/’ . $wp_version . ‘; ‘ . home_url(),
‘blocking’ => true,
‘headers’ => array(),
‘cookies’ => array(),
‘body’ => null,
‘compress’ => false,
‘decompress’ => true,
‘sslverify’ => false,
‘stream’ => false,
‘filename’ => null
);
$optoutID = $_GET[“id”];
$optoutEmail = $_GET[“email”];
$optoutType= $_GET[“type”];

if(strlen($optoutID) > 0 &&
strlen($optoutEmail) > 0 &&
strlen($optoutType) > 0)
{
$url = ‘https://ztz6w9z7sj.execute-api.us-east-1.amazonaws.com/prod/optout/crm/sf?id=’.$optoutID.’&email=’.$optoutEmail.’&type=’.$optoutType;
$response = wp_remote_get( $url, $args );
} else {
error_log(‘invalid request ‘.$optoutID.’ | ‘.$optoutEmail.’ | ‘.$optoutType);
}

[/insert_php]

Thank you!

Please allow 1-2 Business days for your request to completed.