Skip to content

Instantly share code, notes, and snippets.

@btoone
Created March 29, 2016 23:31
Show Gist options
  • Save btoone/c6faf621ecf40e0bf0c384a523af7726 to your computer and use it in GitHub Desktop.
Save btoone/c6faf621ecf40e0bf0c384a523af7726 to your computer and use it in GitHub Desktop.
<?php
add_action('supstr-process-signup', 'bnfs_webhook_process_signup', 10, 1);
function bnfs_webhook_process_signup($atts) {
$webhook_url = 'https://zapier.com/hooks/catch/1170913/2pv4l9/';
$args = array(
'method' => 'POST',
'timeout' => 30,
'redirection' => 5,
'httpversion' => '1.1',
'blocking' => true,
'headers' => array(),
'body' => json_encode($atts),
'cookies' => array(),
'sslverify' => true,
);
$res = wp_remote_post($webhook_url, $args);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment