Skip to content

Commit

Permalink
SparkPost setupWebhook(). See: wpsharks/comment-mail#265
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswsinc committed Nov 3, 2016
1 parent e92c2d0 commit b47a41b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/includes/classes/RveSparkPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public static function setupWebhook()
'domain' => $rve_sparkpost_reply_to_domain,
]),
]);
$wp_remote_request_response = wp_remote_request('https://api.sparkpost.com/api/v1/relay-webhooks', [
$wp_remote_response = wp_remote_request('https://api.sparkpost.com/api/v1/relay-webhooks', [
'method' => 'POST',
'timeout' => 5,

Expand All @@ -330,7 +330,7 @@ public static function setupWebhook()
],
]),
]);
$api_response = json_decode(wp_remote_retrieve_body($wp_remote_request_response));
$api_response = json_decode(wp_remote_retrieve_body($wp_remote_response));

if (is_object($api_response) && !empty($api_response->results->id)) {
$plugin->options['rve_sparkpost_webhook_setup_hash'] = md5($plugin->options['rve_sparkpost_api_key'].$plugin->options['rve_sparkpost_reply_to_email']);
Expand Down

0 comments on commit b47a41b

Please sign in to comment.