Skip to content

Commit

Permalink
feat: further webhooks removals
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmikita committed Jul 3, 2024
1 parent 2f0ff9d commit 0124a7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,32 +453,6 @@ public function carriersSettings($settings)
'sanitize' => [new CoreFields\Checkbox(), 'sanitize'],
]
);

$carriers->addGroup(__('Webhook', 'notification'), 'webhook')
->addField(
[
'name' => __('Enable', 'notification'),
'slug' => 'enable',
'default' => 'true',
'addons' => [
'label' => __('Enable Webhook Carrier', 'notification'),
],
'render' => [new CoreFields\Checkbox(), 'input'],
'sanitize' => [new CoreFields\Checkbox(), 'sanitize'],
]
)
->addField(
[
'name' => __('Headers', 'notification'),
'slug' => 'headers',
'default' => false,
'addons' => [
'label' => __('Allow to configure webhook headers', 'notification'),
],
'render' => [new CoreFields\Checkbox(), 'input'],
'sanitize' => [new CoreFields\Checkbox(), 'sanitize'],
]
);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/Repository/RecipientRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public static function register()
Register::recipient('email', new Recipient\UserID());
Register::recipient('email', new Recipient\Role());

if (! apply_filters('notification/compat/webhook/register', true)) {
return;
}

foreach (self::$webhookRecipientTypes as $type => $name) {
$recipient = new Webhook($type, $name);

Expand Down

0 comments on commit 0124a7c

Please sign in to comment.