mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Merge pull request #3539 from woocommerce/PCP-4941-add-branded-only-system-report-entry
Fix the "New UI active" status report, add "Branded only" status report (4941)
This commit is contained in:
commit
70271d53b4
1 changed files with 12 additions and 6 deletions
|
@ -15,6 +15,8 @@ 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\Data\GeneralSettings;
|
||||
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;
|
||||
|
@ -85,6 +87,9 @@ class StatusReportModule implements ServiceModule, ExtendingModule, ExecutableMo
|
|||
|
||||
$subscription_mode_options = $c->get( 'wcgateway.settings.fields.subscriptions_mode_options' );
|
||||
|
||||
/* @var GeneralSettings $general_settings General plugin settings. */
|
||||
$general_settings = $c->get( 'settings.data.general' );
|
||||
|
||||
// Feature flag convention.
|
||||
// phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
$items = array(
|
||||
|
@ -96,16 +101,17 @@ class StatusReportModule implements ServiceModule, ExtendingModule, ExecutableMo
|
|||
$this->onboarded( $bearer, $is_connected )
|
||||
),
|
||||
),
|
||||
array(
|
||||
'label' => esc_html__( 'Branded only', 'woocommerce-paypal-payments' ),
|
||||
'exported_label' => 'Branded only',
|
||||
'description' => esc_html__( 'Whether the plugin is in Branded only mode or not.', 'woocommerce-paypal-payments' ),
|
||||
'value' => $this->bool_to_html( $general_settings->own_brand_only() ),
|
||||
),
|
||||
array(
|
||||
'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' ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue