Merge branch 'trunk' into PCP-886-hide-pay-pal-card-processing-tab-is-not-available-in-country-or-for-merchant

This commit is contained in:
dinamiko 2022-09-29 12:02:29 +02:00
commit 0655a8bdce

View file

@ -143,6 +143,21 @@ class WebhookModule implements ModuleInterface {
$logger->error( 'Failed to load webhooks list: ' . $exception->getMessage() );
}
}
add_action(
'woocommerce_paypal_payments_gateway_migrate',
static function () use ( $container ) {
$registrar = $container->get( 'webhook.registrar' );
assert( $registrar instanceof WebhookRegistrar );
add_action(
'init',
function () use ( $registrar ) {
$registrar->unregister();
$registrar->register();
}
);
}
);
}
/**