From e6fef4a6f5c5045a5cebe9c3e411e2d51edbd7b0 Mon Sep 17 00:00:00 2001 From: Philipp Stracker Date: Thu, 9 Jan 2025 19:15:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Subscribe=20to=20webhooks=20afte?= =?UTF-8?q?r=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ppcp-settings/src/Service/AuthenticationManager.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ppcp-settings/src/Service/AuthenticationManager.php b/modules/ppcp-settings/src/Service/AuthenticationManager.php index 96108b0e1..96d7f3bc1 100644 --- a/modules/ppcp-settings/src/Service/AuthenticationManager.php +++ b/modules/ppcp-settings/src/Service/AuthenticationManager.php @@ -22,6 +22,7 @@ use WooCommerce\PayPalCommerce\Settings\Data\GeneralSettings; use WooCommerce\PayPalCommerce\WcGateway\Helper\EnvironmentConfig; use WooCommerce\WooCommerce\Logging\Logger\NullLogger; use WooCommerce\PayPalCommerce\Settings\DTO\MerchantConnectionDTO; +use WooCommerce\PayPalCommerce\Webhooks\WebhookRegistrar; /** * Class that manages the connection to PayPal. @@ -418,6 +419,11 @@ class AuthenticationManager { * first time. */ do_action( 'woocommerce_paypal_payments_authenticated_merchant' ); + + /** + * Subscribe the new merchant to relevant PayPal webhooks. + */ + do_action( WebhookRegistrar::EVENT_HOOK ); } } }