🐛 Subscribe to webhooks after login

This commit is contained in:
Philipp Stracker 2025-01-09 19:15:15 +01:00
parent 15be837d24
commit e6fef4a6f5
No known key found for this signature in database

View file

@ -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 );
}
}
}