first commit

This commit is contained in:
2026-04-28 15:13:50 +02:00
commit a95acc355b
63745 changed files with 9487948 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
/**
* The webhook module factories.
*
* @package WooCommerce\PayPalCommerce\Webhooks
*/
declare (strict_types=1);
namespace WooCommerce\PayPalCommerce\Webhooks;
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\WebhookEndpoint;
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
return array('webhook.status.registered-webhooks' => function (ContainerInterface $container): array {
$endpoint = $container->get('api.endpoint.webhook');
assert($endpoint instanceof WebhookEndpoint);
$is_connected = $container->get('settings.flag.is-connected');
if ($is_connected) {
return $endpoint->list();
}
return array();
});