Skip to content

Commit 4ecf6c1

Browse files
committed
Remove get_webhooks() and associated tests
1 parent 3b8a826 commit 4ecf6c1

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

src/ConvertKit_API.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -820,23 +820,6 @@ public function get_subscriber_tags(int $subscriber_id)
820820
);
821821
}
822822

823-
/**
824-
* Returns all created webhooks.
825-
*
826-
* @since 1.0.0
827-
*
828-
* @return false|object
829-
*/
830-
public function get_webhooks()
831-
{
832-
return $this->get(
833-
'automations/hooks',
834-
[
835-
'api_secret' => $this->api_secret,
836-
],
837-
);
838-
}
839-
840823
/**
841824
* Creates a webhook that will be called based on the chosen event types.
842825
*

tests/ConvertKitAPITest.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,31 +1237,6 @@ public function testGetSubscriberTagsWithInvalidSubscriberID()
12371237
$subscriber = $this->api->get_subscriber_tags(12345);
12381238
}
12391239

1240-
/**
1241-
* Test that get_webhooks() returns the expected data.
1242-
*
1243-
* @since 1.0.0
1244-
*
1245-
* @return void
1246-
*/
1247-
public function testGetWebhooks()
1248-
{
1249-
// Create a webhook first.
1250-
$result = $this->api->create_webhook(
1251-
'https://webhook.site/2705fef6-34ef-4252-9c78-d511c540b58d',
1252-
'subscriber.subscriber_activate',
1253-
);
1254-
$ruleID = $result->rule->id;
1255-
1256-
// List webhooks, confirming the webhook created exists in the list.
1257-
$webhooks = $this->api->get_webhooks();
1258-
$this->assertIsArray($webhooks);
1259-
1260-
// Destroy the webhook.
1261-
$result = $this->api->destroy_webhook($ruleID);
1262-
$this->assertEquals($result->success, true);
1263-
}
1264-
12651240
/**
12661241
* Test that create_webhook() and destroy_webhook() works.
12671242
*

0 commit comments

Comments
 (0)