Fix the 'New UI active' status report.

After making the new settings module always active, we need to rely on `SettingsModule::should_use_the_old_ui()` to determine whether the new UI is being used.
This commit is contained in:
Narek Zakarian 2025-07-17 16:21:38 +04:00
parent ba8b42068a
commit efed7b793a
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -15,6 +15,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Helper\ReferenceTransactionStatus;
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
use WooCommerce\PayPalCommerce\Button\Helper\MessagesApply;
use WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper;
use WooCommerce\PayPalCommerce\Settings\SettingsModule;
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ExecutableModule;
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ExtendingModule;
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ModuleClassNameIdTrait;
@ -100,12 +101,7 @@ class StatusReportModule implements ServiceModule, ExtendingModule, ExecutableMo
'label' => esc_html__( 'New UI active', 'woocommerce-paypal-payments' ),
'exported_label' => 'New UI active',
'description' => esc_html__( 'Indicates whether the new Settings UI is enabled.', 'woocommerce-paypal-payments' ),
'value' => $this->bool_to_html(
apply_filters(
'woocommerce.feature-flags.woocommerce_paypal_payments.settings_enabled',
'1' === get_option( 'woocommerce-ppcp-is-new-merchant' ) || getenv( 'PCP_SETTINGS_ENABLED' ) === '1'
)
),
'value' => $this->bool_to_html( ! SettingsModule::should_use_the_old_ui() ),
),
array(
'label' => esc_html__( 'Shop country code', 'woocommerce-paypal-payments' ),