From ffaf1eb142e7d8d1aeb2db519569c0b2746ef829 Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Wed, 19 Feb 2025 19:29:15 +0400 Subject: [PATCH] Force the fraudnet to be enabled when the new settings module is active --- modules/ppcp-wc-gateway/services.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php index 920be9f0a..9bb5ae0c9 100644 --- a/modules/ppcp-wc-gateway/services.php +++ b/modules/ppcp-wc-gateway/services.php @@ -1854,6 +1854,13 @@ return array( $settings = $container->get( 'wcgateway.settings' ); assert( $settings instanceof Settings ); + if ( apply_filters( + 'woocommerce.feature-flags.woocommerce_paypal_payments.settings_enabled', + getenv( 'PCP_SETTINGS_ENABLED' ) === '1' + ) ) { + return true; + } + return $settings->has( 'fraudnet_enabled' ) && $settings->get( 'fraudnet_enabled' ); }, 'wcgateway.fraudnet-assets' => function( ContainerInterface $container ) : FraudNetAssets {