Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed Oct 2, 2019
1 parent 2b09dc2 commit 3aa1f99
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/WebhookTrigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,19 @@ public static function triggerEditTerm($id, $tax_id, $tax_slug)
*/
public static function fireWebhook()
{
$webhook = sitesauce_deployments_get_build_hook();
$hook = sitesauce_deployments_get_build_hook();

if (!$webhook) {
if (!$hook) {
return;
}

if (false === filter_var($webhook, FILTER_VALIDATE_URL)) {
if (false === filter_var($hook, FILTER_VALIDATE_URL)) {
return;
}

$args = apply_filters('sitesauce_deployments_webhook_request_args', [
'blocking' => false
]);

do_action('sitesauce_deployments_before_fire_webhook');

$return = wp_remote_get($webhook, $args);
$return = file_get_contents($hook);

do_action('sitesauce_deployments_after_fire_webhook');

Expand Down

0 comments on commit 3aa1f99

Please sign in to comment.