Merge pull request #3526 from woocommerce/PCP-5001-display-migration-notice-only-on-pay-pal-payments-settings-pages

Display migration notice only on PayPal Payments settings pages (5001)
This commit is contained in:
Emili Castells 2025-07-16 17:17:13 +02:00 committed by GitHub
commit ba8b42068a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,7 +120,11 @@ class SettingsModule implements ServiceModule, ExecutableModule {
*/
add_filter(
Repository::NOTICES_FILTER,
static function ( array $notices ): array {
static function ( array $notices ) use ( $container ): array {
if ( ! $container->get( 'wcgateway.is-ppcp-settings-page' ) ) {
return $notices;
}
$message = sprintf(
// translators: %1$s is the URL for the startup guide.
__(